Mls parsing error handling adapted to menhir
This commit is contained in:
parent
9448ed23a1
commit
b93b176383
2 changed files with 1 additions and 3 deletions
|
@ -22,7 +22,7 @@ let parse parsing_fun lexing_fun lexbuf =
|
|||
with
|
||||
| Mls_lexer.Lexical_error(err, pos1, pos2) ->
|
||||
lexical_error err (Loc(pos1, pos2))
|
||||
| Parsing.Parse_error ->
|
||||
| Mls_Parser.Error ->
|
||||
let pos1 = Lexing.lexeme_start lexbuf
|
||||
and pos2 = Lexing.lexeme_end lexbuf in
|
||||
let l = Loc(pos1,pos2) in
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
%{
|
||||
|
||||
open Misc
|
||||
open Signature
|
||||
open Names
|
||||
open Ident
|
||||
|
@ -71,7 +70,6 @@ let mk_var name ty = mk_var_dec name ty
|
|||
%type <Minils.program> program
|
||||
|
||||
%%
|
||||
/*TODO add arrow (init) ?*/
|
||||
|
||||
/** Tools **/
|
||||
%inline slist(S, x) : l=separated_list(S, x) {l}
|
||||
|
|
Loading…
Reference in a new issue