Hi
I am creating a translator from one language to another. My tree
grammar is as follows:
specification : ^(INPUT_VARIABLES expr)
expr : ^((',' | ('&'?) | ('|'?)) expr*) | exp;
exp : ^(('+' | '-' | '>' | '<' | '>=' | '<=' | '=' | '!=') exp*) |
term;
term : ^(('*' | '/') term*) | LITERAL;
I want to pass the value of LITERAL to expr so that the rewrite would
be converting like:
(INPUT_VARIABLES (+ X Y)) -> (INPUT_VARIABLES X Y)
How should I just consider the values of the literal and ignore the
root node?
Swathy
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---