Hello,
I am trying to build grammar rules for the following boolean expression.
E1 AND E2 AND E3 AND ... AND En
Here, E1, E2,...,En could consist boolean expressions of both OR and AND
I have started with this
expression
: or_relationalExpression ( AND^ or_relationalExpression)*
;
or_relationalExpression
: relationalExpression (OR^ | AND^ relationalExpression )*
;
But, as expected, it causes problems of following format
Any idea to solve or rewrite the grammar rules??
Thanks in advance.
[fatal] rule or_relationalExpression has non-LL(*) decision due to recursive
rule invocations reachable from alts 2,3. Resolve by left-factoring or using
syntactic predicates or using backtrack=true option.
|---> : relationalExpression (OR^ | AND^ relationalExpression )*
warning(200): /CarFast/src/ConditionsGrammar.g:55:58: Decision can match input
*** using multiple alternatives: 2, 3 As a result, alternative(s) 3 were
disabled for that input
|---> : relationalExpression (OR^ | AND^ relationalExpression )*
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.