[antlr-interest] Syntactic predicates sanity check
exits funnel
exitsfunnel at yahoo.com
Sun Apr 16 15:32:29 PDT 2006
Hello,
I'm pretty new to LL parsing and I just want a quick
sanity check. Imagine that I have these rules:
a: (T2)* T3 | b T4;
b: (T2)* T5 | (T6);
Am I right to assume that withtout refactoring the
rules, I would need to use a syntactic prediate to
disambiguate the two alternatives to (a)? Something
like this:
a: ((T2)* T3)=> (T2)* T3 | b T4;
It seems so because there can be an arbitrary number
of T2s on the input stream. I just want to verify
that I'm not missing something because I know that
there is a performance cost associated with syntactic
predicates, so I'd like to avoid them when possible.
Thanks!
-exits
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the antlr-interest
mailing list