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

BNFC does not allow empty declarations in .cf files #215

Closed
andreasabel opened this issue Nov 24, 2017 · 1 comment
Closed

BNFC does not allow empty declarations in .cf files #215

andreasabel opened this issue Nov 24, 2017 · 1 comment
Assignees
Labels
enhancement LBNF Concerning the LBNF syntax and its checking
Milestone

Comments

@andreasabel
Copy link
Member

BNFC (haskell) accepts totally empty input files, but not

;

It should also allow empty declarations consisting just of a ;.
This would allow a style like

-- comment
; Rule. S ::= P
-- comment
; Rule2. S ::= Q

where semicolons are aligned at the first column.

@andreasabel
Copy link
Member Author

This can be fixed by defining custom Def lists with the extra rule:

_. [Def] ::= ";" [Def] ;

@andreasabel andreasabel added this to the 2.8.2 milestone Jan 1, 2018
@andreasabel andreasabel self-assigned this Jan 1, 2018
@andreasabel andreasabel added the LBNF Concerning the LBNF syntax and its checking label Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement LBNF Concerning the LBNF syntax and its checking
Projects
None yet
Development

No branches or pull requests

1 participant