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

Ric Klaren klaren at cs.utwente.nl
Wed Feb 25 07:21:43 PST 2004


On Wed, Feb 25, 2004 at 02:29:11PM -0000, Simon Kellett wrote:
> 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.

I use it daily ;) I think I updated the docs with respect to custom ast's
after rc2 release though. I'm not sure if it had big inconsistencies. A
superfluous underscore might have slipped in. Anyway I just added a new
snapshot to my snapshots page:

http://wwwhome.cs.utwente.nl/~klaren/antlr/

This also includes a extended treewalk example that uses a customAST with
line number support. That one should work out of the box and has all the
bells and whistles to use a custom AST.

> "...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.

This does look weird.. Though it could be due to some mistake/typo earlier.
Another option is that you're using an exotic compiler? Anycase give the
above snapshot a spin and let me know if it works.

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
  "Good judgement comes from experience.
     Experience comes from bad judgement." --- Unknown



 
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