[antlr-interest] Custom AST types in 2.7.3rc2 (C++)

Simon Kellett skellett at anitesystems.de
Wed Feb 25 06:29:11 PST 2004


Has anyone got this working ? I have been following the example in the
Manual ("C++ Notes"). My C++ is not briliant but have found what I think
are some problems with the example, but I still get stuck.

1) Example confuses between (Ref)My_AST and (Ref)MyAST (note the
underscore).

2) There appears to be a circular dependancy between My_AST/MyAST
Ref_MyAST/RefMyAST class and typedefs.

In my code (in addition to following the manual) I have:
1) removed the underscore
2) added "class LmpAST;" before the typedef
3) in my .g file I added #include "LmpGrammer.hpp" to the parser

But I get lots of strange errors when the parser compiles (full path
cut):

"...lib/cpp/antlr/BaseAST.hpp", line 15: Error: Namespaces cannot be
declared in a class scope.
".../lib/cpp/antlr/BaseAST.hpp", line 19: Error: Template ASTRefCount
is not defined.

Any pointers greatly appreciated :-)

Regards, Simon



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list