Hopefully this is an easy question for someone with some Antlr skill.

Is it possible to have a rewrite rule that will convert an IN
expression to an OR expression?

E.g.  from

expression IN ('FEE','FIE','FOE','FUM')

to

(expression = 'FEE') OR (expression = 'FIE') OR (expression = 'FOE')
OR (expression = 'FUM')

I have a grammer with:

equalityExpression
        :   relationalExpression (((EQUALS|NOTEQUALS|CONTAINS|LIKE|REGEX)^
relationalExpression)* | IN^ inList)
        ;

inList
        :       c=compoundExpr -> ^(IN_LIST $c)
        ;

compoundExpr
        : (OPEN! ( (value (COMMA! value)*) ) CLOSE!)
        ;

-- 
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.

Reply via email to