D grammar

WebFreak001 via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 12 05:14:33 PDT 2016


On Sunday, 12 June 2016 at 06:45:58 UTC, Russel Winder wrote:
> I should know this, but…
>
> Is there an official D grammar (EBNF or otherwise) or is the 
> language
> defined by the DMD parser?
>
> I am looking to continue Kingsley's DLanguage IntelliJ IDEA 
> plugin and for that it is necessary to have a grammar 
> specification. Kingsley has been working on one, but there may 
> be differences between it and 2.071. Given the compilers and 
> all the supporting tools either there is one language 
> specification they all work with or there is a lot of 
> fragmented viewpoints as to what D actually is. I am hoping the 
> latter is not the case.

There is a full grammar definition on the D Spec pdf file: 
https://dlang.org/dlangspec.pdf

I also converted the whole grammar (excluding Allocator & 
Deallocator Arguments) with some nicer names to a txt file: 
https://i.webfreak.org/c5aCpv


More information about the Digitalmars-d mailing list