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

Use white-space as separator #70

Closed
gdetrez opened this issue Nov 21, 2013 · 2 comments
Closed

Use white-space as separator #70

gdetrez opened this issue Nov 21, 2013 · 2 comments
Assignees
Labels
enhancement lists Concerning list categories and separator/terminator/delimiter pragmas printer Concerning the generated printer
Milestone

Comments

@gdetrez
Copy link
Contributor

gdetrez commented Nov 21, 2013

A frequent question is how to use white-space as a separator, doing this:

separator A " ";

doesn't work and the answer is to use an empty string:

separator A "";

Maybe bnfc could accept " " as a separator and treat it like "".

@andreasabel andreasabel added this to the 2.8.4 milestone Nov 24, 2019
@andreasabel andreasabel self-assigned this Nov 24, 2019
@andreasabel
Copy link
Member

It is easy to treat white space separator rules as terminator "" rules. (Fixed.)
A bit more work is needed if we want to print the user provided white space separators faithfully. (Done for the Haskell backend, so far.)

andreasabel added a commit that referenced this issue Nov 24, 2019
Some of the other backends will need adjustment of their printers as well.
@andreasabel andreasabel added the lists Concerning list categories and separator/terminator/delimiter pragmas label Jan 4, 2020
@andreasabel
Copy link
Member

Printing now fixed for the other backends.

@andreasabel andreasabel added the printer Concerning the generated printer label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement lists Concerning list categories and separator/terminator/delimiter pragmas printer Concerning the generated printer
Projects
None yet
Development

No branches or pull requests

2 participants