Skip to content

Commit

Permalink
Revert "change menhir version"
Browse files Browse the repository at this point in the history
This reverts commit ff33332.
  • Loading branch information
dyzsr committed Jun 4, 2021
1 parent ff33332 commit a9992dc
Show file tree
Hide file tree
Showing 3 changed files with 2,460 additions and 2,499 deletions.
15 changes: 11 additions & 4 deletions boot/menhir/menhirLib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1509,8 +1509,7 @@ module Make (T : TABLE) = struct

(* In the legacy strategy, we call [reduce] instead of [announce_reduce],
apparently in an attempt to hide the reduction steps performed during
error handling. This seems inconsistent, as the default reduction steps
are still announced. In the simplified strategy, all reductions are
error handling. In the simplified strategy, all reductions steps are
announced. *)

match strategy with
Expand Down Expand Up @@ -1546,7 +1545,15 @@ module Make (T : TABLE) = struct
else begin

(* The stack is nonempty. Pop a cell, updating the current state
with that found in the popped cell, and try again. *)
to the state [cell.state] found in the popped cell, and continue
error handling there. *)

(* I note that if the new state [cell.state] has a default reduction,
then it is ignored. It is unclear whether this is intentional. It
could be a good thing, as it avoids a scenario where the parser
diverges by repeatedly popping, performing a default reduction of
an epsilon production, popping, etc. Still, the question of whether
to obey default reductions while error handling seems obscure. *)

let env = { env with
stack = next;
Expand Down Expand Up @@ -3785,5 +3792,5 @@ module MakeEngineTable (T : TableFormat.TABLES) = struct
end
end
module StaticVersion = struct
let require_20201216 = ()
let require_20210419 = ()
end
2 changes: 1 addition & 1 deletion boot/menhir/menhirLib.mli
Original file line number Diff line number Diff line change
Expand Up @@ -1803,5 +1803,5 @@ module MakeEngineTable
and type nonterminal = int
end
module StaticVersion : sig
val require_20201216: unit
val require_20210419: unit
end

0 comments on commit a9992dc

Please sign in to comment.