[antlr-interest] newbie teething problem(s)
Chris Black
chris at lotuscat.com
Wed Jun 29 21:48:35 PDT 2005
James Wilkinson wrote:
> I've been working my way through "An Introduction to ANTLR" and had a
> couple of things not work as expected:
> [stuff deleted]
> 2. When I got to the AST construction section, I made the changes to
> the grammar and the Main program and got a null pointer exception.
> Sure enough, parser.getAST() returns a null pointer. Now I'm totally
> derailed.
>
> Can somebody give me an idea of what to try now?
I don't know the particular examples you speak of, but for getAST to
work you need to have an options section that includes buildAST=true; in
your parser.
Hope that helps,
Chris
More information about the antlr-interest
mailing list