Hi all!
I try to write a small XML lexer using Antlr 2.7.4 (see code below).
When compiling the Lexer the following message is returned:
minimal.g: warning:lexical nondeterminism between rules X and CDATA upon
minimal.g: k==1:'<'
minimal.g: k==2:'A'
minimal.g: k==3:'B'
I do not understand this message because the CDATA production does
recognize the sequence '<', 'A', 'B'.
Can anyone help?
Best regards,
Stefan Wachter
PS: Here is the lexer:
class MyLexer extends Lexer;
options {
k=3;
charVocabulary = '\3'..'\377';
caseSensitive=true;
}
X : "<ABC>" ;
CDATA :
( CDATA_SECT | ~( '&' | '<' | ' ' | '\t' | '\n' | '\r' ) )+
;
protected CDATA_SECT : "<![CDATA[" CDATA_DATA "]]>" ;
protected CDATA_DATA :
( ~']' | ']' ~']' | "]]" ~'>' )*
;
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet
News==----
http://www.newsfeeds.com
The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---