BNF grammar for D?

landaire via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 27 15:06:26 PDT 2014


There have been similar questions asked on this forum before 
(most recent one in June with no result: 
http://forum.dlang.org/thread/CAFMGiz8Fyv2A+ScQPQtEYEsFSybZNfY--nsxL5rqNoWWNA4agg@mail.gmail.com?page=1), 
but I was curious if anyone happens to have a BNF grammar for D 
laying around. I've searched all over and can't seem to find 
anything.

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.

I know nothing about writing language grammars but based off what 
I've seen it doesn't look like it'd be *too* difficult to pick 
up, so if anyone also has suggestions for good readings I'd 
appreciate that as well.


More information about the Digitalmars-d mailing list