BNF grammar for D?

Jeremy Powers via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 27 15:35:06 PDT 2014


This looks eerily familiar...

I took a stab at an Intellij plugin a long time ago, and happened to pick
the same name:

https://github.com/elendel-/intelliD

Been meaning to pick back up again, but haven't had the chance... was
waiting for the Eclipse plugin code to mature, then got distracted.  Feel
free to take anything that looks useful.


Brian Schott (Hackerpilot) has done a lot of useful work grammar wise.  See:

https://github.com/Hackerpilot/DGrammar

An interesting path to take for an intellij plugin would be to use his
DCD/libdparse for all the heavy lifting, with the plugin just farming out
the work to external daemon process(es).  That would avoid having yet
another lexer/parser implementation to keep up to date.




On Mon, Oct 27, 2014 at 3:06 PM, landaire via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> 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 at 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20141027/fe0e4a99/attachment-0001.html>


More information about the Digitalmars-d mailing list