[antlr-interest] Referencing attributes

Junkman j at junkwallah.org
Thu May 20 12:19:45 PDT 2010


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



More information about the antlr-interest mailing list