Commit c50ccbcd authored by POTTIER Francois's avatar POTTIER Francois

Exposed [nullable] in [Grammar.Analysis].

parent 3743df74
...@@ -1092,6 +1092,8 @@ let rec convert = function ...@@ -1092,6 +1092,8 @@ let rec convert = function
module Analysis = struct module Analysis = struct
let nullable = Array.get nullable
let nullable_first_rhs = nullable_first_rhs let nullable_first_rhs = nullable_first_rhs
let explain_first_rhs (tok : Terminal.t) (rhs : Symbol.t array) (i : int) = let explain_first_rhs (tok : Terminal.t) (rhs : Symbol.t array) (i : int) =
......
...@@ -363,6 +363,12 @@ end ...@@ -363,6 +363,12 @@ end
module Analysis : sig module Analysis : sig
(* [nullable nt] is the NULLABLE flag of the non-terminal symbol [nt].
That is, it is true if and only if this symbol produces the empty
word [epsilon]. *)
val nullable: Nonterminal.t -> bool
(* [nullable_first_rhs rhs i] considers the string of symbols found at (* [nullable_first_rhs rhs i] considers the string of symbols found at
offset [i] in the array [rhs]. It returns its NULLABLE flag as well offset [i] in the array [rhs]. It returns its NULLABLE flag as well
as its FIRST set. The offset [i] must be contained between [0] and as its FIRST set. The offset [i] must be contained between [0] and
......
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