Commit 2b30ceca authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Added [Terminal.iter_real].

parent ed23b08c
......@@ -242,6 +242,13 @@ module Terminal = struct
let mapx f =
Misc.mapi sharp f
let () =
assert (error = 0)
let iter_real f =
for i = 1 to n-2 do
f i
(* If a token named [EOF] exists, then it is assumed to represent
ocamllex's [eof] pattern. *)
......@@ -155,6 +155,11 @@ module Terminal : sig
val mapx: (t -> 'a) -> 'a list
(* [iter_real] offers iteration over all real terminals, i.e. all
terminals except [error] and [#]. *)
val iter_real: (t -> unit) -> unit
(* The sub-module [Word] offers an implementation of words (that is,
sequences) of terminal symbols. It is used by [LRijkstra]. We
make it a functor, because it has internal state (a hash table)
Supports Markdown
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