[antlr-interest] Line and Column information lost during AST creation
boutter at ps.uni-sb.de
Thu Jan 4 04:48:54 PST 2007
Xue Yong Zhi wrote:
> You need to replace the default AST class with the one like this:
I now wrote something very similar.
> Then call setASTNodeClass in your parser to use your AST class, e.g.
I've done that too. I call:
That gives me the following error message:
Can't find/access AST Node
I came across a tutorial for self designed ASTs and found that one
should include in the options of the parser and tree walker the statement:
But that wouldn't help either.
The problem may be that the TokenTypeToASTClassMap isn't initialized and
I think therefore the right AST class is not used. This is probably due
to the fact that the parser doesn't find the AST Node type. But why?
Thanks for help.
> Christophe Boutter wrote:
>> My problem is that during the AST creation in the parser all information
>> about lines and columns of the lexer Token is lost. But I need this
>> informations badly. Why is that?
Try not to become a man of success, but rather try to become a man of value.
-- Albert Einstein
More information about the antlr-interest