[antlr-interest] astFactory is NULL

Terence Parr parrt at jguru.com
Thu May 15 10:12:16 PDT 2003


Hi Keppel,

I noted the same problem myself when I tried to run 2.7.1 antlr 
generated code with 2.7.2 libraries.  The ast factory is created 
/initialized differently.  When I used 2.7.2 to generate the files and 
then compile/rule, it seemed to work :)

Terence

On Wednesday, May 14, 2003, at 01:15  PM, kyin20 wrote:

> Hi,
>
> I'm using antlr 2.7.2_03 and Eclipse antlr plug-in.
> I'm encountering a strange problem.
>
> I compiled the antlr source codes and use the generated .class files
> rather than the jar file "antlrall.jar"
> that has been built when running my program.
>
> In my sql parser options, I've specified  "buildAST = true",
> the generated code does have codes to generate AST.
>
> But when I run the parser, astFactory is null, and caused a null
> pointer exception.
>
> I have no idea where astFactory should be initialized. Can someone
> shed light on this?
>
> Adding to the mystery is that if I add the "antlrall.jar" to my
> classpath and not use the antlr .class files I generated, then I can
> run my program successfully.
>
> Thanks for any help.
>
> Keppel
>
>
>
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list