[antlr-interest] problems with the ECMAScript grammar for ANTLR 3.0
Angel Todorov
attodorov at gmail.com
Tue Aug 15 07:25:54 PDT 2006
Hi guys,
I am having problems generating a lexer and a parser for the
"official" ECMAScript grammar posted on your website , for ANTLR v
3.0:
java -cp ".;antlr-2.7.6.jar;antlr.3.0b2.jar;stringtemplate-2.3b8.jar"
antlr.Tool ecmascriptA3.g
ANTLR Parser Generator Version 2.7.6 (2005-12-22) 1989-2005
ecmascriptA3.g:1:1: unexpected token: grammar
error: Token stream error reading grammar(s):
ecmascriptA3.g:60:11: expecting ''', found '*'
ecmascriptA3.g:1:1: rule grammar trapped:
ecmascriptA3.g:1:1: unexpected token: grammar
TokenStreamException: expecting ''', found '*'
Before i dive deeper into solving these problems, am i doing something
completely wrong with the tool , or the grammar file has incorrect
syntax anyway ? Thank you very much in advance.
P.S: Here is a link to the grammar i am using :
http://www.antlr.org/grammar/1153976512034/ecmascriptA3.g
Regards,
Angel Todorov
More information about the antlr-interest
mailing list