[antlr-interest] Abstract tree parser

Daniels, Troy (US SSA) troy.daniels at baesystems.com
Tue Feb 23 12:04:06 PST 2010


 

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org 
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of 
> Christian Pontesegger
> Sent: Tuesday, February 23, 2010 2:46 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Abstract tree parser
> 
> Hi,
> 
> I am creating a treeparser in java which needs some methods. 
> I do not want to put them into the @members section as the 
> code is quite large.
> Is there a way to create an abstract class for the parser? 
> Then I could put the the abstract methods into the @members 
> section and implement them in a subclass.
> 
> Is there a way to do that?
> 

I don't think there's a way to do that.  However, you can write an abstract parser with your methods and then specify that as the parent class of the parser.  That should have the effect you desire.  Your class would need to extend a specific Antlr class.  Check the docs for more details.

Troy

> thanks
> Christian
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: 
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
> 


More information about the antlr-interest mailing list