> Hi all,
> 
> I am new to ANTLR. I have an old grammar to start from. I use antlr3
> with CSharp2 target.
> The condition does not compile:
> 
>  */
> NUM_INT
>       :       ('0'..'9')+ // everything starts with a digit sequence
>               (       (       {(LA(2)!='.')&&(LA(2)!=')')}?                   
>         // force k=2; avoid ".."
> //PSPSPS example ARRAY (.1..99.) OF char; // after .. thinks it's a
> NUM_REAL
>                               '.' {state.type = NUM_REAL;}    // dot means we 
> are float
>                               ('0'..'9')+ (EXPONENT)?
>                       )?
>               |       EXPONENT {state.type = NUM_REAL;}       // 'E' means we 
> are float
>               )
>       ;
> 
> But,  the function: LA(2)  is not defined? Is there an equivalent?
> 
> Thank you

Being a lexer rule, try using input.LA(2) instead.

Johannes
-- 
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL 
für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

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