Commit 68ba7eb4 authored by POTTIER Francois's avatar POTTIER Francois

Comments.

parent 04ea8f79
......@@ -838,14 +838,9 @@ let invert reductions : TerminalSet.t ProductionMap.t =
(* ------------------------------------------------------------------------ *)
(* [has_beforeend s] tests whether the state [s] can reduce a production
whose semantic action can peek at the before-endpos, that is, the end
position of the cell that is at the top of the stack after popping and
before pushing. *)
(* This is also the case if [s] can reduce a production whose semantic
action uses [$endpos($0)]. Note that [$startpos] and [$endpos] have
been expanded away, so we need not worry about the fact that they
can be used in an epsilon production. *)
whose semantic action uses [$endpos($0)]. Note that [$startpos] and
[$endpos] have been expanded away already, so we need not worry about
the fact that (in an epsilon production) they expand to [$endpos($0)]. *)
let has_beforeend node =
TerminalMap.fold (fun _ prods accu ->
......
......@@ -84,9 +84,9 @@ val forbid_default_reduction: node -> bool
val invert : ProductionMap.key list TerminalMap.t -> TerminalSet.t ProductionMap.t
(* [has_beforeend s] tests whether the state [s] can reduce a production
whose semantic action can peek at the before-endpos, that is, the end
position of the cell that is at the top of the stack after popping and
before pushing. *)
whose semantic action uses [$endpos($0)]. Note that [$startpos] and
[$endpos] have been expanded away already, so we need not worry about
the fact that (in an epsilon production) they expand to [$endpos($0)]. *)
val has_beforeend: node -> bool
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment