[antlr-interest] predicate question
Gavin Lambert
antlr at mirality.co.nz
Wed May 7 01:12:21 PDT 2008
At 18:53 7/05/2008, Mark Wright wrote:
>Note: Maybe you were thinking of a situation with syntactic
>predicates or backtracking as well as dis-ambiguating semantic
>predicates. I am not using syntactic predicates or
backtracking,
>so I don't have any experience with them. Instead I have
written
>lots of dis-ambiguating semantic predicates using hand coded
>recursive descent compilers, which is like hand coded
backtracking.
Interesting; I've basically taken the exact opposite path. Most
of my grammars either use no predicates at all, or they use
syntactic predicates (though those are mostly in the lexer, not
the parser). And I've often switched on backtracking. Generally
for the stuff I've been working on the performance hit caused by
backtracking is negligible compared to how much more readable it
makes the grammar.
More information about the antlr-interest
mailing list