[antlr-interest] Parse trace?

cowan at acm.org cowan at acm.org
Sun May 17 11:02:10 PDT 2009


This option wasn't listed at
http://www.antlr.org/wiki/display/ANTLR3/Command+line+options so I added the
following line to the table:

|-trace | generate a parser with trace output - if the default output is not
enough, you can override the traceIn and traceOut methods|

George

> -----Original Message-----
> From: Terence Parr [mailto:parrt at cs.usfca.edu] 
> Sent: Thursday, May 14, 2009 5:48 PM
> To: Tilman Bender
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Parse trace?
> 
> 
> -trace option will work great for you. recompile and when you 
> run your  
> parser traceIn/traceOut methods will be called. you can 
> override them  
> or use the default which spits out information.
> 
> Ter
> On May 14, 2009, at 11:34 AM, Tilman Bender wrote:
> 
> > Hi Jay,
> >
> > I am sure what you mean by "annotatin my grammar with trace  
> > statements".
> > If you mean doing this manually for every rule/alternative: 
> you need  
> > not do that.
> >
> > As far as I see you can have ANTLR add such trace information for  
> > you, so you do not have to do
> > it manually. I've seen this as a config option in the antlr3-maven- 
> > plugin and I am sure there is a corresponding
> > ANTLR-Tool option for this.
> >
> > Another (maybe weird) idea: Isn't this a typical use case for AOP?  
> > Would it be feasible to weave the logging
> > into the whole thing? Just an idea ;-)
> >
> > Tilman Bender
> > Student des Software Engineering
> > Hochschule Heilbronn
> > tbender at stud.hs-heilbronn.de
> >
> >
> >
> > Am 14.05.2009 um 20:07 schrieb West Jay - Toronto-MROC - external:
> >
> >> So far, the only option I've seen is annotating my grammar with  
> >> trace statements that'll execute during parsing.  Ick.  Is there  
> >> not a better way?
> >
> >
> > 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