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

Allow for tolerance to extra white space and blank lines #229

Closed
simoami opened this issue Jan 15, 2014 · 1 comment
Closed

Allow for tolerance to extra white space and blank lines #229

simoami opened this issue Jan 15, 2014 · 1 comment

Comments

@simoami
Copy link

simoami commented Jan 15, 2014

because Peg is sensitive to white space, my grammar is loaded with begin and end per expression e.g.

background = 
    (begin "Background:" end)

begin = sp*
end = (sp eol / eol) *
sp = ' '
eol = '\n'

this works with:

Background:

--or--

      Background:  


but ideally I'd prefer to keep my grammar free of white space handling around each terminal definition.

@dmajda
Copy link
Contributor

dmajda commented Jan 15, 2014

Duplicate of #11.

@dmajda dmajda closed this as completed Jan 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants