Nothing Special   »   [go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error location missing with recent menhir (starting with 2021-12-30 release) #414

Closed
1 task done
andreasabel opened this issue Feb 9, 2022 · 1 comment · Fixed by #415
Closed
1 task done

Error location missing with recent menhir (starting with 2021-12-30 release) #414

andreasabel opened this issue Feb 9, 2022 · 1 comment · Fixed by #415
Assignees
Labels
Ocaml/Menhir parser Issues concerning parser generating regression upstream
Milestone

Comments

@andreasabel
Copy link
Member
andreasabel commented Feb 9, 2022

Recent menhir departs in its error handling from ocamlyacc.
With ocamlyacc:

bnfc/testing/regression-tests/100_coercion_lists$ ocaml/TestTest bad01.in 
Parse error at 1.9-1.10
(exitcode 1)

With menhir:

$ ocaml-menhir/TestTest bad01.in 
Fatal error: exception ParTest.MenhirBasics.Error
(exitcode 2)

Upstream issue:

@andreasabel andreasabel added parser Issues concerning parser generating Ocaml/Menhir regression upstream labels Feb 9, 2022
@andreasabel andreasabel added this to the 2.9.4 milestone Feb 10, 2022
@andreasabel
Copy link
Member Author

We could get rid of the error rules (entrypoints) altogether and let the user catch Parsing.Parse_error (ocamlyacc) or <Lang>.Error (menhir). For menhir, we have no choice than to do this. For ocamlyacc, we keep the error rules for now so that we do not change the API without need. Getting rid of these in the future we could also retire the BNFC_Util module. Maybe in 3.0.

@andreasabel andreasabel self-assigned this Feb 10, 2022
andreasabel added a commit that referenced this issue Feb 10, 2022
…XX.Error

The semantics of the error token changed in Menhir-2021-12-30 and is
no longer compatible to OcamlYacc.
andreasabel added a commit that referenced this issue Feb 10, 2022
…XX.Error

The semantics of the error token changed in Menhir-2021-12-30 and is
no longer compatible to OcamlYacc.
andreasabel added a commit to hangingman/bnfc that referenced this issue Mar 3, 2022
…ParXXX.Error

The semantics of the error token changed in Menhir-2021-12-30 and is
no longer compatible to OcamlYacc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ocaml/Menhir parser Issues concerning parser generating regression upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant