[antlr-interest] Bad grammar?
rkevinburton at charter.net
rkevinburton at charter.net
Fri Jul 18 11:22:53 PDT 2008
I am relatively new to ANTLR so as suggested I am starting with one of the "known" grammars. I decided to start with the JavaScript grammar by Chris Lambrou. It failed to parse what I think is valid JavaScript. So I decided to try to debug the problem and I found (in ANTLRWorks) that the following rule is not right:
formalParameterList
: '(' (LT!* Identifier ( ',' LT!* Identifier)*)? ')'
;
If in ANTLRWorks I start at that rule and with the interpreter try '(a,b)' I get:
'(' FailedPredicateException(formalParameterList, {synpred16}?)
I am not able right now to debug it further. What is wrong with this rule?
Thank you.
Kevin
More information about the antlr-interest
mailing list