[antlr-interest] Attributes and other ingformation management
Daniel Alcíbar
danialcibar at gmail.com
Wed Feb 1 10:45:02 PST 2012
First of all, excuse me for my English. I am finishing my Final Year
Project and I need your help. I want to know how I can access to the "a
token information" of a rule from another second rule. I know that for
attributes declared in "scope" I can acceed to the infomation as follows:
variable = $rule:: attributes;
But if the information that interests me is in the AST tree of a rule,
example:
rule:
//code
^ (^ DECL_VAR_ARR (var_name a = IDENT) ^ (LENGTH expr))
//more code
;
I need to know how to access the contents of "expr" from another rule. This
is an integer, but I need to handle it in another second rule.
Thank you very much.
More information about the antlr-interest
mailing list