Module Parse


module Parse: sig .. end
Linking lexer and parser function, with (basic) error messages

exception Lex_error
val lex_eol : Lexing.lexbuf -> unit
Function to call on line returns in lexer
val parse_lexbuf : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> Lexing.lexbuf -> 'b
Takes as input a lexer, a parser compatible with the lexer (ie, they share the same type for tokens), and a lexbuf,

Returns the AST built by the parser.

val parse_string : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> string -> 'b
Same as before, but create itself a lexbuf from the given string.
val parse_file : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> string -> 'b
Same as before, but create itself a lexbuf from the given filename.