[antlr-interest] Parse trace?

Terence Parr parrt at cs.usfca.edu
Thu May 14 14:47:44 PDT 2009


-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