[antlr-interest] generated parser fails when ANTLRWorks Interpreter doesn't
Andrey Talnikov
a.v.talnikov at gmail.com
Mon Dec 20 19:49:48 PST 2010
Hi guys,
While trying to implement C parser based on the C.g I've run into a
problem. Parsing following code with CParser.translation_unit() leads to
no viable alternative at token '.'.
int main()
{
base.field;
}
I've tried almost all of 3.x ANTLR versions with default generating
options without any success. I've even generated debug parser and passed
BlankDebugEventListener to it.
While debugging the grammar with the ANTLRWorks Interpreter and
ANTLRv3IDE as well on the same input, both build correct tree.
From my point of view, it could be somehow related to the
http://www.antlr.org/jira/browse/ANTLR-178 bug.
I would appreciate if anybody could tell me how to either understand
what is wrong in the grammar or generate working parser, for example the
one which ANTLRWorks Interpreter uses.
Thanks for helping,
Andrew
More information about the antlr-interest
mailing list