[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sablecc-user] Modify the grammar file
Hi D.,
Have you tried deleting all class files then recompiling all Java sources?
Sometimes the Java compiler does not recompile all classes, and this can
cause problems.
If this does not help, you will need to provide us with more information
(like the grammar file).
Etienne
VO Duc Duy wrote:
I wanted to add some new keyword in an existing compiler, so I added it
in Tokens, then Productions. Then I use sablecc (2.9) to regenerate this
modified grammar, then compile all the generated files in
node/analysis/parser/lexer, they are all ok. But when I run the parser,
it always shows the exception like:
java.lang.ClassCastException
at parser.Parser.new51(Parser.java:1058)
at parser.Parser.parse(Parser.java:296)
I didn't change anything in the input file, I didn't use my new keyword
in the input file yet, but it always shows this exception.
Anybody has idea of this error?
Or please tell me how to add some new keywords in an existing grammar file?
Thank you in advance.
D.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Sablecc-user mailing list
Sablecc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sablecc-user
--
Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/