Commit 14e17a0f authored by POTTIER Francois's avatar POTTIER Francois
Browse files

New function [Production.error_free].

parent 5a49ee23
Pipeline #200219 passed with stages
in 57 seconds
......@@ -845,6 +845,9 @@ module Production = struct
with Not_found ->
assert false (* [nt] is not a start symbol *)
let error_free prod =
Misc.array_for_all Symbol.non_error (rhs prod)
(* Iteration. *)
let init f =
......
......@@ -479,6 +479,11 @@ module Production : sig
val start: int
(* [error_free prod] returns [true] if the right-hand side of the
production [prod] does *not* contain the [error] pseudo-token. *)
val error_free: index -> bool
(* This produces a string representation of a production. It should
never be applied to a start production, as we do not wish users
to become aware of the existence of these extra productions. *)
......
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