ANTLR grammar for D?

Wesley Hamilton via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 20 02:22:05 PDT 2014


On Friday, 20 June 2014 at 07:47:44 UTC, dennis luehring wrote:
> Am 20.06.2014 08:57, schrieb Wesley Hamilton:
>> I've started making a D grammar for ANTLR4, but I didn't want 
>> to
>> spend days testing and debugging it later if somebody already 
>> has
>> one.
>>
>> The best search results turn up posts that are 10 years old. 
>> Only
>> one post has a link to a grammar file and the page seems to 
>> have
>> been removed. I also assume it would be obsolete with changes 
>> to
>> ANTLR and D.
>> http://www.digitalmars.com/d/archives/digitalmars/D/25302.html
>> http://www.digitalmars.com/d/archives/digitalmars/D/4953.html
>>
>
> most uptodate seems to be 
> https://github.com/Hackerpilot/DGrammar

Thanks. Just realized that the "add grammar" button for ANTLR 
grammar list is broken... so that could be why it's not there. 
I'll probably still finish the grammar I'm making since I'm 75% 
done. That's a great reference, though. I think it's missing a 
few minor details like delimited strings, token strings, and 
assembly keywords.

It should help where the Language Reference pages aren't 
accurate. For example, I think HexLetter is incorrectly defined.


More information about the Digitalmars-d mailing list