Re: [PATCH] Hooks still needed for annotations

Daniel Jacobowitz
2005-07-03T16:45:02Z

On Wed, Jun 15, 2005 at 12:31:47PM -0400, Bob Rossi wrote:
> Well, I already have planned a way to translate the parse tree into Tcl.
> I am going to walk the parse tree and then build up a Native Tcl parse
> tree using callbacks. By doing this, I can write testcase's in Tcl using
> the parse tree. This would really allow for a much higher level of testing.
> The ADA developers could use the exact same approach and it would be much
> more trivial for them to do so.
>
> I'm getting a vibe from you that you think writing a parser could be a
> bad idea. Do you really think that the community wouldn't embrace such a
> parser? The whole reason I decided to create it (or at least in the
> works) is because I was frustrated with the thought of writing yet
> another low level parser to parse the MI. I just wanted one that worked,
> and worked well. Even more than that, I wanted one that I didn't have to
> constantly maintain. I mean, Nick and I are already going to create
> two different parsers. As things evolve, and the parser's need to work
> with old versions of GDB, different bugs will pop up in each. I think
> this hurts GDB in the long run. I also firmly think that the
> only possible way to get a stable MI parser is to test it in GDB's
> testsuite.

In GDB's testsuite it tests against the current versions of GDB, so
obviously if you want it to work with old GDBs then that isn't enough
testing to be useful.

I don't much care whether you write a reusable parser or not. I'm
skeptical that it should be maintained as a part of the GDB
distribution, with the intention for other projects to import it from
GDB. If it's part of GDB, then it's going to be GPL, which will
restrict its use. If it's not part of GDB, then GDB developers aren't
going to update it. Pick your poison... I don't know which I think
would be a better idea, yet. I haven't thought about it much.

--
Daniel Jacobowitz
CodeSourcery, LLC