[dox] Fixing the lexical rule for BinaryInteger
Andre Artus
andre.artus at gmail.com
Fri Aug 16 16:07:36 PDT 2013
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 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.
More information about the Digitalmars-d
mailing list