module type LEX = sig
.. end
The type of lexer modules.
type
d
The type of auxiliary data passed to eval
.
type
lexbuf
The type of buffers of lexemes.
type
lexeme
The type of lexemes.
type
cat =
The type of categories or classes of lexemes.
val of_string : string -> lexbuf
The lexer for strings.
val of_channel : Pervasives.in_channel -> lexbuf
The lexer for in_channels.
val next : lexbuf -> lexeme * lexbuf
Function to return the next lexeme from a lexbuf.
Returns pair of the next lexeme, and the new lexbuf which no longer starts with that lexeme
val cat_of : lexeme -> cat
Returns the category of a lexeme.
val eval : d ->
lexeme ->
lexeme Kwstack.t -> lexeme Kwstack.t
Evaluator of lexical semantics.
Returns new value stack, possibly with old values popped off and new values pushed on by op
val table : lexeme -> lexeme -> Kwparse.srae
Function implementing 2-dimensional Shift-Reduce table of previous lexeme and next input lexeme.
Returns a value of type srae