[antlr-interest] Problems - KCSParse

DG l nwo2757 at hotmail.com
Tue Nov 28 08:24:02 PST 2006


Hello, I've recently only begun delving into the world of parsing as part of 
a project. I'm attempting to use antlr on the example KCSParse provided with 
the download. Several false starts later I'm getting errors along the lines 
of

ANTLR Parser Generator   Version 2.7.7 (2006-11-01)   1989-2005
CSharpParser.g:1845: warning:nondeterminism between alts 1 and 5 of block 
upon
CSharpParser.g:1845:     
k==1:PP_DEFINE,PP_UNDEFINE,PP_COND_IF,PP_LINE,PP_ERROR,
PP_WARNING,PP_REGION
CSharpParser.g:1845:     
k==2:"true","false","default",PP_DEFINE,PP_UNDEFINE,PP_
COND_IF,PP_LINE,PP_ERROR,PP_WARNING,PP_REGION,PP_ENDREGION,PP_FILENAME,PP_IDENT,
PP_STRING,PP_NUMBER,OPEN_PAREN,LOG_NOT,"abstract","as","base","bool","break","by
te","case","catch","char","checked","class","const","continue","decimal","delega
te","do","double","else","enum","event","explicit","extern","finally","fixed","f
loat","for","foreach","goto","if","implicit","in","int","interface","internal","
is","lock","long","namespace","new","null","object","operator","out","override",
"params","private","protected","public","readonly","ref","return","sbyte","seale
d","short","sizeof","stackalloc","static","string","struct","switch","this","thr
ow","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","virtual
","void","volatile","while",UINT_LITERAL,LONG_LITERAL,ULONG_LITERAL,DECIMAL_LITE
RAL,FLOAT_LITERAL,DOUBLE_LITERAL,"add","remove","get","set","assembly","field","
method","module","param","property","type",IDENTIFIER,INT_LITERAL,CHAR_LITERAL,S
TRING_LITERAL,OPEN_CURLY,OPEN_BRACK,SEMI,PLUS,MINUS,STAR,BIN_AND,BIN_NOT,INC,DEC

>From what I can gather this warning is telling me that it's something to do 
with the lookahead. I have not modified the base examples in anyway. So my 
question is thus; where have I let it all go wrong? Your advice is 
appreciated.
aindriu

Software Engineering is guesswork, constrained by business. Once we can 
reduce money to binary format it will flow like data and programming shall 
be pure. --unknown

_________________________________________________________________
Find a baby-sitter FAST with MSN Search! http://search.msn.ie/



More information about the antlr-interest mailing list