Commit 086798f6 authored by POTTIER Francois's avatar POTTIER Francois

Delay the call to [exit_if grammatical_error].

This should fix several bugs with [--strict]:
some warnings were not properly turned into errors by [--strict],
and the .conflicts file was not created when [--strict] was enabled.
parent 08fcc5fa
...@@ -532,3 +532,10 @@ let () = ...@@ -532,3 +532,10 @@ let () =
Lr1.extra_reductions(); Lr1.extra_reductions();
Time.tick "Adding extra reductions" Time.tick "Adding extra reductions"
(* ------------------------------------------------------------------------ *)
(* If any warnings about the grammar have been emitted up to this point,
and if [--strict] is enabled, now is the time to stop, before going
into the back-end. *)
let () =
Error.exit_if Error.grammatical_error
...@@ -933,13 +933,6 @@ let () = ...@@ -933,13 +933,6 @@ let () =
(* ------------------------------------------------------------------------ *) (* ------------------------------------------------------------------------ *)
(* If any fatal error was signaled up to this point, stop now. *)
let () =
Error.exit_if Error.grammatical_error
(* ------------------------------------------------------------------------ *)
(* For each production, compute where (that is, in which states) this (* For each production, compute where (that is, in which states) this
production can be reduced. This computation is done AFTER default conflict production can be reduced. This computation is done AFTER default conflict
resolution (see below). It is an error to call the accessor function resolution (see below). It is an error to call the accessor function
......
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