Module Keywords.Make
Parameters
Signature
val reserve : string -> unit
reserve s
reserves the words
as if it was a keyword, although it will not be defined as one. The exceptionInvalid_argument
is raised if the words
is already reserved.
val check : string -> unit
check s
callsEarley.give_up ()
ifs
is a reserved word. It can be used to reject keywords while parsing identifiers for example.
val create : string -> unit Earley.grammar
create s
reserves the keywords
and returns a parser accepting the strings
, not followed by a character ofS.id_charset
. In the case wheres
is already reserved,Invalid_argument
is raised.
val special : string -> unit Earley.grammar
special s
accpets the same input ascreate s
, but the words
is not reserved.