Module Keywords.Make
Parameters
Signature
- val reserve : string -> unit
- reserve sreserves the word- sas if it was a keyword, although it will not be defined as one. The exception- Invalid_argumentis raised if the word- sis already reserved.
- val check : string -> unit
- check scalls- Earley.give_up ()if- sis a reserved word. It can be used to reject keywords while parsing identifiers for example.
- val create : string -> unit Earley.grammar
- create sreserves the keyword- sand returns a parser accepting the string- s, not followed by a character of- S.id_charset. In the case where- sis already reserved,- Invalid_argumentis raised.
- val special : string -> unit Earley.grammar
- special saccpets the same input as- create s, but the word- sis not reserved.