BNF grammar for D?
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 27 15:30:14 PDT 2014
On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote:
> I've searched all over and can't seem to find anything.
There are links to my projects in that thread.
https://github.com/Hackerpilot/libdparse should help. The doc
comments for the parser tell you the grammar that they implement.
(The DGrammar project is based on these ddoc comments. This
reminds me that I need to update it.) The official language spec
on http://dlang.org/grammar.html has been getting better
recently. You may want to look at that as well.
> I'm trying to make a plugin for IntelliJ IDEA to support D
> (https://github.com/landaire/intelliD is what I have now
> utilizing DDT's lexer) but a lot of what's required to add
> advanced features like code folding, code completion, etc. is
> generally autogenerated by JetBrains's Grammar Kit plugin which
> only generates that stuff from a BNF grammar.
Beware that D's grammar is ambiguous in several places.
More information about the Digitalmars-d
mailing list