Closed JoAllg closed 3 years ago
I can confirm that this is a problem in --ocaml-menhir
but not in --ocaml
.
@JoAllg: Thanks for the bug report! I pushed a fix, could you please check that it works for you?
@andreasabel thanks for the quick fix! It does work! Though both column numbers are offset by one char, should be +1 char to the right
@JoAllg: It seems that the column is computed wrongly in:
https://github.com/BNFC/bnfc/blob/fb4606b069fff8761fcfec26df636fd64f3e71ba/source/src/BNFC/Backend/OCaml/CFtoOCamlTest.hs#L76-L77
Looking at e.g.
https://github.com/let-def/ocamllex/blob/e5c8421f8fe56017e9b4e58c3496356631843802/lexer.mll#L54
it seems like a +1
is missing here.
I'll push a fix. Thanks for the alert!
@JoAllg: I pushed a fix for the column, so that it is now counted from 1 (and not from 0). Welcome to test again!
@andreasabel works like a charm now :-)
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
:and testfile
test_contract.tz
:and execution with