Skip to content

List category of internal category should be internal #465

Open

Description

@andreasabel

BNFC creates an invalid parser if one makes a list of internal non-terminals.

EVar.              Exp ::= Ident            ;

internal VInteger. Val ::= Integer          ;
internal VExp.     Val ::= Exp "{" [Eq] "}" ;
internal VEq.      Eq  ::= Ident ":=" Val   ;

separator Eq ","                            ;

I didn't find any version of BNFC that would alert of the problem or silently do the right thing (make [Eq] internal as well).

Update: coercions of purely internal categories also end up in the parser, but do not cause errors there (just garbage).

Activity

  1. added
    parser
    on Oct 26, 2023
  2. added this to the 2.9.6 milestone on Oct 26, 2023
  3. self-assigned this
    on Oct 26, 2023
  4. added
    internal rules
    on Oct 26, 2023
  5. andreasabel commented on Oct 27, 2023

    @andreasabel
    MemberAuthor

    Maybe we should support internal { ... } blocks which can also contain list pragmas and rules etc.

  6. added 2 commits that reference this issue on Oct 27, 2023
  7. modified the milestones: 2.9.6, 2.9.7 on Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buginternal rulesparser

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions