Skip to content

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

Closed

Description

@andreasabel

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:

Activity

  1. added
    parser
    on Feb 9, 2022
  2. added this to the 2.9.4 milestone on Feb 10, 2022
  3. andreasabel commented on Feb 10, 2022

    @andreasabel
    MemberAuthor

    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.

  4. self-assigned this
    on Feb 10, 2022
  5. added a commit that references this issue on Feb 10, 2022
    e2bd6df
  6. added a commit that references this issue on Feb 10, 2022
    a75cce9
  7. added a commit that references this issue on Mar 3, 2022
    a242f97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Ocaml/Menhirparserregressionupstream

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions