[antlr-interest] ClassCastExceptions extending CommonAST
Terence Parr
parrt at cs.usfca.edu
Mon Dec 13 22:07:23 PST 2004
On Dec 13, 2004, at 9:27 PM, inyoursadmachine wrote:
> Hi,
> I'm brand new to ANTLR and this mailing list. I'm using ANTLR to
> write an emulator for a C-like language but
> getting 'ClassCastExceptions' when using extension of CommonAST. At
> first I thought it was me but when I ran in to the -exact- same
> problem with the 'Pascal' example I thought I'd ask here.
>
>
> I'm using ANTLR 2.7.4 and Java version is 1.5
>
> C:\>java -version
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
>
>
> C:\Program Files\ANTLR\antlr-2.7.4\examples\java\pascal>java
> PascalParser big.pas
> Parsing...
> C:\Program Files\ANTLR\antlr-2.7.4\examples\java\pascal\big.pas
> Can't find/access AST Node typePascalAST
Hi. :) The error should help out I think. Seems it's trying to create
those node types, but can't. Look for the invocation of the parser and
see if it is setting the node type. You might also look at the
ASTLabel option in the grammar to see if that's set. Is
typePascalAST.java around in the CLASSPATH?
Ter
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list