[antlr-interest] Changes in ASTFactory breaks custom AST classes

Terence Parr parrt at jguru.com
Sat Dec 14 13:08:43 PST 2002

On Sunday, December 8, 2002, at 05:44  AM, Marco Hunsicker wrote:

> Hi all,
> I've just updated to the current ANTLR distro (2.7.2a6-20021130) and
> noticed that my dereived ASTFactory did not work as expected anymore
> (I only use the Java stuff). I took a look at antlr.ASTFactory.java
> and realized that the dup(AST) method changed (of course, the whole
> class was expanded, but this is the one change that has bitten me).

Fixed to call initialize(AST).

> Another minor thing I've noticed is that the new "classHeaderPrefix"
> option (cool!) has been only implemented for lexers. I hope this is
> not intentional?

Added prefix to all grammars so you can say:

class TP extends TreeParser;

options {
         classHeaderPrefix="public abstract";

Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


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

More information about the antlr-interest mailing list