[antlr-interest] Referencing attributes

Terence Parr parrt at cs.usfca.edu
Thu May 20 12:23:07 PDT 2010


anywhere you can do arbitrary code, though not all attr are always visible.
T
On May 20, 2010, at 12:19 PM, Junkman wrote:

> Sorry for dupe, but I'm hoping to get some/any response.
> 
> Are attribute reference allowed outside actions and action-like elements
> (e.g., semantic predicates), other than as parameters in rule invocation?
> 
> Thanks for any info.
> 
> J
> 
> Junkman wrote:
>> Greetings,
>> 
>> I'm a Antlr noob, and have a question regarding accessing attributes.
>> 
>> Where, outside of action, can you reference attributes?  One place seems
>> to be as parameter to rule invocation like this:
>> 
>> decl: type declarator[ $type.text ] ';' ;
>> 
>> This is from The Definitive Antlr Reference,  page 119.
>> 
>> Is that true in general?  Are there other locations outside of actions
>> where attributes can be accessed?
>> 
>> As noted, I am a noob to Antlr and just joined this list.  Please let me
>> know if this email's question/topic is not appropriate to the list.
>> 
>> Thanks.
>> 
>> 
>> 
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list