D Grammar in BNF Text Form?
Dejan Lekic via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jun 6 07:45:52 PDT 2014
On Friday, 6 June 2014 at 12:05:36 UTC, Robert Schadek via
Digitalmars-d wrote:
> On 06/06/2014 12:29 PM, Tom Browder via Digitalmars-d wrote:
>> Can anyone point me to a text version of the D grammar in some
>> kind of
>> BNF or EBNF format? The D lang web site's info is close, but
>> it's
>> buried in html which I'ld rather not have to wrestle with.
>>
>> My purpose is to attempt to write a D language parser in Perl
>> using
>> Damian Conway's Regex::Grammars module (on CPAN).
>>
>> Thanks.
>>
>> Best regards,
>>
>> -Tom
> The site says it creates recursive decent parser. D does not
> even fit
> into lalr1. So it will not work, unless you can inject
> handwritten parse
> function for the critical parts
Dscanner project has ANTLR grammer for D. It is unpolished, but
works. It is on Github.
More information about the Digitalmars-d
mailing list