D Grammar in BNF Text Form?

Bruno Medeiros via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 10 08:14:08 PDT 2014


On 06/06/2014 23:40, Brian Schott wrote:
> On Friday, 6 June 2014 at 22:25:16 UTC, Tom Browder via Digitalmars-d
> wrote:
>> Now I'm confused--the three files I've found have differences in
>> production rules--it  looks like I'll have to look at what the
>> compiler is actually doing--I'm putting that off for a while unless
>> someone has another idea .
>
> Use the HTML version. I haven't updated the ANTLR one in a while. (You
> may not have noticed the line in the readme that says "The file that
> you're probably looking for is grammar.html.")
>
> Right now there are four parsers for D:
>
> Mine, which is used by DCD and D-Scanner:
> https://github.com/Hackerpilot/Dscanner/blob/master/std/d/
>
> DParser2, which powers Mono-D:
> https://github.com/aBothe/D_Parser/tree/master/DParser2/Parser
>
> LibD which is used by SDC:
> https://github.com/deadalnix/libd/tree/master/src/d/parser
>
> The DMD front-end which is used by DMD, LDC, and GDC:
> https://github.com/D-Programming-Language/dmd/blob/master/src/parse.c

Also: the DTool parser (written in Java), which powers DDT:
https://github.com/bruno-medeiros/DDT/tree/master/org.dsource.ddt.dtool/src/dtool/parser


-- 
Bruno Medeiros
https://twitter.com/brunodomedeiros


More information about the Digitalmars-d mailing list