[antlr-interest] some questions
Balvinder Singh
bals1978 at hotmail.com
Wed Jun 12 05:04:42 PDT 2002
Hi...
Question 1
I have following lexer, in which I want both Digit and Integer to be accesed
from parser, but obiviously these two rule have conflict.
Can't we do some kind of maximum matching as we can do in Flex.
class Test extends Lexer;
options{
k=2;
}
Digit : '0' .. '9' { System.out.println("Digit "+ $getText);}
;
Integer : ( options {greedy=true;} :Digit)+ { System.out.println("Integer "+
$getText);}
;
Question 2
During parsing I want some token, and this token may have some conflicts
with other tokens , is there any way that parser could tell lexer that first
search the desired token and if not found then search for others.
thanx
balvinder
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list