[antlr-interest] #setType (C++)

Hrvoje Nezic hrvoje.nezic at envox-lab.hr
Thu Dec 5 05:36:21 PST 2002

Is it possible to use #setType in C++?
In options I declared:
    buildAST = true;

and then tried to use #setType in rules:

    PLUS^ { #PLUS.setType(UNARY_PLUS); } ...

This is translated into:

    antlr::RefAST tmp19_AST = antlr::nullAST;

and cannot be compiled, because ASTRefCount doesn't have 
the setType method (RefAST is defined as ASTRefCount<AST>).

Is there a workaround for this, or am I doing something wrong?

Hrvoje Nezic


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

More information about the antlr-interest mailing list