[antlr-interest] DebugParser constructors

Thomas Brandon tbrandonau at gmail.com
Fri Jun 29 19:58:53 PDT 2007


On 6/29/07, Thomas Brandon <tbrandonau at gmail.com> wrote:
> On 6/29/07, Terence Parr <parrt at cs.usfca.edu> wrote:
> >
> > On Jun 26, 2007, at 8:06 AM, Thomas Brandon wrote:
> >
> > > Would it be possible for debug parsers to delegate the public
> > > DebugParser(TokenStream input, DebugEventListener dbg) constructor. So
> > > you can provide a tracing listener, or a listener that doesn't block
> > > on socket. Saves having to keep switching debug on and off when doing
> > > some debugging in AW. Adding through members would break when
> > > debugging wasn't used.
> >
> > I pass in the parse tree builder and other stuff without sockets all
> > the time.  I am not sure what you mean here by delegating constructor.
> >
> > Ter
> >
> >
> When I generate debug code the only constructors I get in my generated
> parser are:
>     public TestParser(TokenStream input, int port)
> public TestParser(TokenStream input);
> So to be able to parse a debug stream I have to also add a
> TestParser(TokenStream input, DebugEventListener dbg) constructor.
>
> Tom.
>
Ah, OK, ANTLRWorks is using a different debug template to ANTLR, ANTLR
does generate the TestParser(TokenStream input, DebugEventListener
dbg) constructor, ANTLRWorks (1.0.2) does not. So my request would be
for ANTLRWorks to also provide this constructor.

Tom.


More information about the antlr-interest mailing list