[antlr-interest] question about example 'ANTLR masquerading as SED'
corno at dds.nl
corno at dds.nl
Sun Dec 22 15:42:04 PST 2002
Hi all,
The following example is from the reference manual.
class T extends Lexer;
options {
k=2;
filter=IGNORE;
charVocabulary = '\3'..'\177';
}
protected
IGNORE
: ( "\r\n" | '\r' | '\n' )
{newline(); System.out.println("");}
| c:. {System.out.print(c);}
;
but it gives a warning about nondeterminism. However, when I comment out the
last code block (behind c:.), there's no warning, which seems strange to me as
it does not alter the logic (or does it).
Can anybody tell me:
a) Why this is
b) If this can be ignored
c) If not, how this can be solved
TIA,
Corno
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list