module Parse:Linking lexer and parser function, with (basic) error messagessig
..end
exception Lex_error
val lex_eol : Lexing.lexbuf -> unit
val parse_lexbuf : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> Lexing.lexbuf -> 'b
lexbuf
,
Returns the AST built by the parser.
val parse_string : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> string -> 'b
lexbuf
from the given string.val parse_file : lexer:(Lexing.lexbuf -> 'a) ->
parser:((Lexing.lexbuf -> 'a) -> Lexing.lexbuf -> 'b) -> string -> 'b
lexbuf
from the given filename.