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

Using PEG.js at runtime works, but generated grammer fails to work? #655

Closed
cmdcolin opened this issue Jul 9, 2020 · 2 comments
Closed

Comments

@cmdcolin
Copy link

cmdcolin commented Jul 9, 2020

I am seeing that if I generate a PEGjs grammer it fails to parse, but if I use PEGjs at runtime it works

Here is a parser generated from the website that fails but including it via pegjs.generate library works

https://github.com/cmdcolin/pegjs_generated_issue_demo

@cmdcolin
Copy link
Author

cmdcolin commented Jul 9, 2020

Oof I figured out my problem: the double backspace of \t \n, etc need to be removed in both the CLI version and website version...

Rubber duck github debugging :)

Note: I have had this problem for several months but just now got it figured out....

@cmdcolin cmdcolin closed this as completed Jul 9, 2020
@cmdcolin
Copy link
Author

cmdcolin commented Jul 9, 2020

If the website/CLI warning when this happened it could be a nice helper function

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

1 participant