BNF grammar for D?

landaire via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 27 15:36:25 PDT 2014


On Monday, 27 October 2014 at 22:30:15 UTC, Brian Schott wrote:
> On Monday, 27 October 2014 at 22:06:28 UTC, landaire wrote:
>> I've searched all over and can't seem to find anything.
>
> There are links to my projects in that thread.

Sorry, what I meant was I couldn't find a BNF grammar :)

I must have overlooked libdparse but I did find  
https://github.com/Hackerpilot/DGrammar which helped quite a bit! 
But cool, thanks for mentioning the grammar comments.

I was more or less hoping I wouldn't have to redo a bunch of the 
work that someone's already done for me by writing the grammar. 
Even if I do have to do it from scratch it should be a good 
learning experience.

> Beware that D's grammar is ambiguous in several places.

Do you have any specific examples off the top of your head?


More information about the Digitalmars-d mailing list