-
Notifications
You must be signed in to change notification settings - Fork 173
Closed
Labels
Ocaml/MenhirbugparserIssues concerning parser generatingIssues concerning parser generatingpositionConcerning position information in parsed ASTConcerning position information in parsed ASTtestConcerning the generated test programConcerning the generated test program
Milestone
Description
the Test*.ml created by the ocaml-menhir backend does not report parse errors with correct line/column numbers. The error is always
Parse error at 0.-1-0.-1
This can for example be checked with this erroneus grammar test.cf :
`token Nat digit+ ;
token Int '-'? digit+ ;
entrypoints Prog ;
Code. Prog ::= Instr ";" [Instr] ;
separator Instr ";" ;
_. Instr ::= Instr ";" ;
IPUSH. Instr ::= "PUSH" CType Data ;
IADD. Instr ::= "DROP" ;
DInt. Data ::= Int ;
CInt. CType ::= "int" ;
and testfile test_contract.tz:
DROP;
ADD;
DROP;
PUSH int -5;
PUSH int 1;
and execution with
bnfc --ocaml-menhir -m -o test test.cf && make -C test
`./ocaml_backend/TestMichelson test_contract.tz
Metadata
Metadata
Assignees
Labels
Ocaml/MenhirbugparserIssues concerning parser generatingIssues concerning parser generatingpositionConcerning position information in parsed ASTConcerning position information in parsed ASTtestConcerning the generated test programConcerning the generated test program