[antlr-interest] learning pitfall....
Lloyd Dupont
lloyd at galador.net
Tue Apr 2 02:24:07 PST 2002
still learning ANTLR and having problems.....
I try with my real problem which is, amongst other things, to rewrite my Java interprer with ANTLR.
I want it to be able to read java or my (so-called) "LJSH script" which could have, for example, import statement anyway.
so I try to compile this:
the java.g grammar (in examples\java\java), this work well.
But if I add this production in the grammar:
// ------- added in java.g, in JavaRecognizer class ----------
script : (statement | importDefinition) * ;
//---------------------------------------------------------------------
there is suddenly a non determinism in "identifierStar" rule, I hardly figure it why and how to debug this.
HHHHHHHHHEEEEEEEEEEEEELLLLLLLLLLLPPPPPPPPPPPP
Please......
(Thanks)
By the way, reading anything I could about nondeterminism I see an example with a token set like that :
-------------
('b' | )
--------------
I hardly figure out what this could mean ! could you explain ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20020402/6797dcfd/attachment.html
More information about the antlr-interest
mailing list