[antlr-interest] Parse tree in the debugger

Gerald Rosenberg gerald at certiv.net
Wed Sep 24 08:46:00 PDT 2008


DBGp is fairly widely used and appears to be the consensus direction 
-- It originated for PHP debugging, but is language 
agnostic.  Eclipse and I believe NetBeans now use built-in DBGp 
servers to handle all debugging operations.  JRuby apparently has a 
java client implementation.

In any event, the protocol has a well defined spec 
(http://www.xdebug.org/docs-dbgp.php) .

C-source is available from the site.  The license is basically BSD.






At 07:49 AM 9/24/2008, Loring Craymer wrote:
>Why hack?  Why not specify a DSL for the debugger/profiler/whatever 
>and make the output conform.  That's a whole lot more maintainable 
>over the long run.
>
>--Loring
>
>
>
>
>----- Original Message ----
> > From: Terence Parr <parrt at cs.usfca.edu>
> > To: Jean Bovet <antlr-list at arizona-software.ch>
> > Cc: antlr mailing list <antlr-interest at antlr.org>
> > Sent: Tuesday, September 23, 2008 9:15:08 PM
> > Subject: Re: [antlr-interest] Parse tree in the debugger
> >
> > Crap. Perhaps we just escape spaces (or remove them as gawd intended) ;)
> >
> > Ter
> > On Sep 23, 2008, at 9:00 PM, Jean Bovet wrote:
> >
> > > Actually the problem lies in the debugger protocol. More
> > > specifically, we are tokenizing the string using white space which
> > > is causing the problem. Look in RemoteDebugEventSocketListener.
> > >
> > > For example, an exit rule event might look like that:
> > >
> > > event = {java.lang.String at 3056}"exitRule /Users/bovet/Folder With
> > > Space/DebuggerTreeTest.g x"
> > >
> > > But it will be tokenized into:
> > >
> > > elements = {java.lang.String[8]@3057}
> > > [0] = {java.lang.String at 3058}"exitRule"
> > > [1] = {java.lang.String at 2782}"/Users/bovet/Folder"
> > > [2] = {java.lang.String at 2783}"With"
> > > [3] = {java.lang.String at 3061}"Space/DebuggerTreeTest.g"
> > > [4] = {java.lang.String at 3062}"x"
> > >
> > > so the "With" becomes the name of the node. We will need to tweak
> > > the protocol a little bit :-)
> > >
> > > Jean
> > >
> > > On Sep 23, 2008, at 12:54 PM, Terence Parr wrote:
> > >
> > >> Awesome news!Thanks for finding this.
> > >>
> > >> Jean: didn't we fix the whitespace issue in directory names earlier?
> > >>
> > >> Ter
> > >> On Sep 23, 2008, at 12:32 PM, Markus Stoeger wrote:
> > >>
> > >>> I have finally figured out what is causing the problem.
> > >>>
> > >>> To reproduce: Put the grammar file into a directory with
> > >>> whitespace in
> > >>> its name, like "My Directory". And set the output directory to empty
> > >>> (so
> > >>> the output will be put into the same directory as the grammar file).
> > >>>
> > >>> When you launch the debugger on this grammar, it will output silly
> > >>> symbol names in the parse tree. The problem goes away when you put
> > >>> the
> > >>> grammar into a directory that doesn't contain spaces in its name
> > >>> (like
> > >>> "MyDirectory").
> > >>>
> > >>> Please try this out and let me know if you can reproduce the problem
> > >>> now.
> > >>>
> > >>> Max
> > >>>
> > >>> Markus Stoeger schrieb:
> > >>>> Markus Stoeger schrieb:
> > >>>>
> > >>>>> Terence Parr schrieb:
> > >>>>>
> > >>>>>
> > >>>>>> Hi gang,Did we ever figure out what's going on here?
> > >>>>>> Ter
> > >>>>>>
> > >>>>>>
> > >>>>> I've bought a new notebook yesterday and will try it out on that
> > >>>>> yet new
> > >>>>> system as soon as possible (probably on sunday).
> > >>>>>
> > >>>>>
> > >>>> I've tried it out right now and it works on the new system! I just
> > >>>> compiled the simple grammar that I have posted before (with the x
> > >>>> +y) and
> > >>>> all symbols are displayed correctly in the debugger's parse tree
> > >>>> view now.
> > >>>>
> > >>>> But I still don't understand why it doesn't work on the old system,
> > >>>> on
> > >>>> the system at work and on the VMWare system.
> > >>>>
> > >>>> One difference between the systems is XP and Vista. I'm running XP
> > >>>> (multilang) on all systems where it displays those "ands". Java
> > >>>> versions
> > >>>> are identical (1.6.7).
> > >>>>
> > >>>> Max
> > >>>>
> > >>>>
> > >>>> 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
> > >>>
> > >>
> > >>
> > >> 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
>
>
>
>
>
>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