[antlr-interest] ANTLRworks and backtrack?
Søren Andersen
soren.andersen at gmail.com
Wed Feb 10 04:03:58 PST 2010
Hello,
I downloaded the Java 1.6 grammar from http://www.antlr.org/grammar/list but I'm having some trouble getting it to work.
Having simply opened it in ANTLRworks (1.3.1), it's already in trouble regarding the unicode definition of IDENTIFIERS at the bottom. This isn't much of an issue for me though, as I'm paring it down to
just "the basics" that I need.
More serious, is the error I get once I've fixed that:
FailedPredicateException(compilationUnit,{can't deal with predicates yet}?).
This seems to be related to the grammar specifying global backtracking and memoization:
options {
backtrack=true;
memoize=true;
}
But if I remove that, the grammar becomes ambiguous and doesn't work...
I could just parse outside ANTLRWorks, but... Well... I really like the easy access to the visual parse-trees ANTRLWorks gives me. :)
Any tips would be most welcome!
Regards,
Søren
More information about the antlr-interest
mailing list