[dox] Fixing the lexical rule for BinaryInteger

Brian Schott briancschott at gmail.com
Fri Aug 16 16:11:27 PDT 2013


On Friday, 16 August 2013 at 23:07:38 UTC, Andre Artus wrote:
> On Friday, 16 August 2013 at 20:00:35 UTC, Brian Schott wrote:
>> I've been doing some work with the language grammar 
>> specification. You may find these resources useful:
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=10233
>> https://github.com/Hackerpilot/DGrammar/blob/master/D.g4
>
> I have fixed up a few issues in DGrammar.g4, I will put them up 
> on GitHub if you are interested.
>
> According the the Definitive ANTLR Reference the following list 
> of words are reserved in ANTLR grammars:
> import, fragment, lexer, parser, grammar, returns, locals, 
> throws, *catch*, *finally*, mode, options, tokens.
>
> The two I marked above caused problems when generating.

I must have missed those when I pulled the grammar out of my 
parser's DDOC comments.

> I don't know whether you are in the middle of trying to fix the 
> indirect left recursion issue but I see that terminals tied to 
> "unaryExpression" are duplicated all over the place. I can fix 
> the recursion issue, and clean up the dups if that would help 
> you.

It would. I'm not actively working on that grammar.


More information about the Digitalmars-d mailing list