Hi

I am creating a translator from one language to another. My tree
grammar is as follows:

specification_root : ^(DECLARATION specification);
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 output of the
rewrite would be like:
(INPUT_VARIABLES (+ X Y)) -> (INPUT_VARIABLES X Y)

Can anyone please tell me how to solve this problem. Thanks in advance
for the help.

Swathy

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

Reply via email to