-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 > tben...@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 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-interest@googlegroups.com To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---