]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - src/utilities/syntacticAnalysis.ml
Imported Upstream version 0.2
[pkg-cerco/acc.git] / src / utilities / syntacticAnalysis.ml
1 exception ParsingError
2
3 type 'token with_pos = 'token * Lexing.position * Lexing.position
4
5 let parsing_step = "during parsing"
6
7 let process ~lexer_init ~lexer_fun ~parser_fun ~input =
8   parser_fun lexer_fun (lexer_init input)
9
10 let process ~lexer_init ~lexer_fun ~parser_fun ~input  = try
11   process ~lexer_init ~lexer_fun ~parser_fun ~input
12 with Sys_error msg ->
13   Error.global_error parsing_step msg
14