[antlr-interest] Overriding default constructor generation in Java

Bill Andersen andersen at ontologyworks.com
Fri May 2 12:36:01 PDT 2008


Folks,

I have a ANTLR 3 tree grammar where I use the superClass option to  
provide a class that handles some semantic bookkeeping chores.  Thing  
I added an extra argument to the constructors inherited from  
TreeParser.  When ANTLR generates the Java for the grammar everything  
is fine except that the default constructors for the generated parser  
class are still there with no super class that can catch their  
argument signatures.

Is there a way to modify this behavior?  I can supply my own  
constructors in the members section and delete the generated ones from  
the java source but that's a step I'd rather avoid.

	.bill




More information about the antlr-interest mailing list