[antlr-interest] DebugParser constructors

Thomas Brandon tbrandonau at gmail.com
Thu Jun 28 18:30:41 PDT 2007


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.


More information about the antlr-interest mailing list