| { set the type of LT(-1) to I_UNKN } -> identifier

jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of A Z
> Sent: Tuesday, May 10, 2011 7:15 AM
> To: [email protected]
> Subject: [antlr-interest] C Target - Assigning rule info to imaginary
> tokens
>
> Hello all,
>
>   I have a case where I need to assign an imaginary token the
> attributes of a token inside a rule. I tried the below but as expected
> it does not have the desired effect.
>
>
> var_or_function :
>   identifier
>   (
>     LPARAN arg_list RPARAN
>       -> ^(I_FUNC[identifier] arg_list)
>   |
>       -> I_UNKN[identifier]
>   );
>
> identifier :
>     SIMPLE_IDENT
>   | ESCAPED_IDENT;
>
>
> Is there any way to do this without merging the two lexer rules into
> one token?
>
> Thanks.
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address

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