[antlr-interest] Grammar issue
Stephen Tuttlebee
themightystephen at googlemail.com
Thu Mar 17 05:00:59 PDT 2011
Hi
Is not the failure to parse:
MESSAGE_1 = this is a message
due to the whitespace between the words in the string following the
equals sign?
Do you have a whitespace lexer rule (often called WS)? I suspect the
parser is failing due to the fact that it parses up to 'MESSAGE_1 =
this' just fine but then after that point it is expecting another
'parametersDeclaration' to follow, for which the remaining input 'is a
message' would not have any rules that matches it (the parser would be
expecting one of three things next, either 'PARAM_', 'MESSAGE_' or
'VARIABLE').
I'm not an expert on ANTLR, but I think that might be your problem.
Thanks
Stephen
More information about the antlr-interest
mailing list