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

List category of internal category should be internal #465

Open
andreasabel opened this issue Oct 26, 2023 · 1 comment
Open

List category of internal category should be internal #465

andreasabel opened this issue Oct 26, 2023 · 1 comment
Assignees
Labels
bug internal rules Concerning the "internal" keyword. parser Issues concerning parser generating
Milestone

Comments

@andreasabel
Copy link
Member

andreasabel commented Oct 26, 2023

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).

@andreasabel andreasabel added bug parser Issues concerning parser generating labels Oct 26, 2023
@andreasabel andreasabel added this to the 2.9.6 milestone Oct 26, 2023
@andreasabel andreasabel self-assigned this Oct 26, 2023
@andreasabel andreasabel added the internal rules Concerning the "internal" keyword. label Oct 26, 2023
@andreasabel
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug internal rules Concerning the "internal" keyword. parser Issues concerning parser generating
Projects
None yet
Development

No branches or pull requests

1 participant