Commit 344ff5e8 authored by POTTIER Francois's avatar POTTIER Francois

Added [Terminal.real].

parent 2b30ceca
......@@ -195,6 +195,9 @@ module Terminal = struct
let pseudo tok =
(tok = sharp) || (tok = error)
let real t =
error <> t && t <> sharp
let token_properties =
let not_so_dummy_properties = (* applicable to [error] and [#] *)
{
......
......@@ -138,10 +138,10 @@ module Terminal : sig
val eof: t option
(* This returns [true] if and only if the token at hand is one of
[#] or [error]. *)
(* A terminal symbol is pseudo if it is [#] or [error]. It is real otherwise. *)
val pseudo: t -> bool
val real: t -> bool
(* Iteration over terminals. The order in which elements are
examined, and the order of [map]'s output list, correspond to the
......@@ -155,8 +155,7 @@ module Terminal : sig
val mapx: (t -> 'a) -> 'a list
(* [iter_real] offers iteration over all real terminals, i.e. all
terminals except [error] and [#]. *)
(* [iter_real] offers iteration over all real terminals. *)
val iter_real: (t -> 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