]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - syntacticAnalysis.ml
0744c613a0ee58d5e7447accbe1525b7bac19b93
[pkg-cerco/acc.git] / 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