[antlr-interest] StringTemplate question
Varun Bhargava
varun.bhargava at carsales.com.au
Thu Aug 7 16:07:14 PDT 2008
Hi All,
I have the following rule in my grammar:
A : B (('AND' | 'OR') B)* ;
B : C '=' D
Where C is an identifier and D is a string literal
If D is an empty string, I do not want to output the the B rule at all
and also want to get rid of the dangling 'AND' or 'OR'.
So for example if my expressions is
Var1 = 'val1' AND Var2 = ''
I want to output
Var1 = 'val1'
How can this be achieved using stringtemplate?
Thanks
Varun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080808/20b92e6a/attachment.html
More information about the antlr-interest
mailing list