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

Support D's own grammar? #125

Open
nesteruk opened this issue Nov 27, 2013 · 1 comment
Open

Support D's own grammar? #125

nesteruk opened this issue Nov 27, 2013 · 1 comment

Comments

@nesteruk
Copy link

Is Pegged preconfigured to parse D itself?

@PhilippeSigaud
Copy link
Collaborator

Hello Dmitry,

sorry for the late answer, I was away for some time.

Yes, Pegged comes with a D grammar in the examples/ directory.

See:
https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/dgrammar.d

The grammar is mainly a copy of the one of the D website.
Caution notice: do not try to generate this parser at compile-time, it's
too big. Dump it into a file using as Module

https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/grammar.d#L25

Also, I know the grammar has some mistakes, but I didn't have the time to
inspect it entirely.

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