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