[antlr-interest] Manual tree construction problem with VC 7.1

Thun anm_thunder at yahoo.com.br
Tue Apr 18 19:40:46 PDT 2006


a: b EOF {#shader = #([ITK_A], b);} ;


b: "B";

I get the following error when compilng the generated code from the parser above:

error C2664: 'antlr::ASTArray::add' : cannot convert parameter 1 from 'void (void)' to 'antlr::RefAST'
a_AST = antlr::RefAST(astFactory->make((new antlr::ASTArray(2))->add(astFactory->create(ITK_A))->add(b)));

The problem is with the '->add(b)'.

b is the matching method for the b rule, it returns void.

It cant compile in VS 2003 C++ 7.1, is there a way to fix it?



Thanks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060418/d8bf7dee/attachment.html


More information about the antlr-interest mailing list