BNF grammar for D?

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 31 05:16:14 PDT 2014


On 1/11/2014 12:35 a.m., Bruno Medeiros wrote:
> On 27/10/2014 22:35, Jeremy Powers via Digitalmars-d wrote:
>>
>> 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.
>
> Integrating DCD might work well, because autocompletion is used
> sporadically (and is invoked explicitly by the user). But parsing is
> probably invoked quite often by IntelliJ, and as such it could be tricky
> to integrate with libdparse (because you'd have to invoke an external
> process all the time)

 From my small test file with my attempt at this, its fine to call e.g. 
DScanner to grab the ast. Its actually pretty fast which I was a little 
shocked about.



More information about the Digitalmars-d mailing list