[antlr-interest] ClassCastExceptions extending CommonAST

inyoursadmachine mwisner69 at comcast.net
Mon Dec 13 21:27:06 PST 2004





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
parser exception: java.lang.ClassCastException: antlr.CommonAST
java.lang.ClassCastException: antlr.CommonAST
        at PascalParser.programHeading(PascalParser.java:261)
        at PascalParser.program(PascalParser.java:201)
        at PascalParser.parseFile(PascalParser.java:79)
        at PascalParser.doFile(PascalParser.java:57)
        at PascalParser.main(PascalParser.java:151)


Is this a known problem?  Is 2.7.4 considered "stable" ?  Should I 
use/try an earlier version?

Thanks in advance,
Matt













 
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