Commit 41e390f7 authored by POTTIER Francois's avatar POTTIER Francois

Publish [Slr.check] and remove one artificial dependency.

parent ec0d6acc
......@@ -12,11 +12,16 @@
(******************************************************************************)
open Grammar
module S = Slr (* artificial dependency; ensures that [Slr] runs first *)
(* This module constructs an LR(1) automaton by following Pager's method, that
is, by merging states on the fly when they are weakly compatible. *)
(* ------------------------------------------------------------------------ *)
(* Run the SLR(1) check first. *)
let () =
Slr.check()
(* ------------------------------------------------------------------------ *)
(* Nodes. *)
......
......@@ -160,7 +160,7 @@ let count_slr_violations () : int =
(* At log level 1, indicate whether the grammar is SLR(1). *)
let () =
let check () =
Error.logG 1 (fun f ->
let count = count_slr_violations() in
if count = 0 then
......@@ -168,4 +168,3 @@ let () =
else
Printf.fprintf f "The grammar is not SLR(1) -- %d states have a conflict.\n" count
)
......@@ -19,3 +19,4 @@
the grammar is in the class SLR(1). This check is performed when the log
level [lg] is at least 1. *)
val check: unit -> unit
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