GDB/MI Output syntax

Andrew Cagney cagney@gnu.org
Tue Aug 24 20:18:00 GMT 2004


> On Tue, Aug 24, 2004 at 03:46:52PM -0400, Andrew Cagney wrote:
> 
>>>> >Bob Rossi <bob@brasko.net> wrote:
>>>> >
>>>
>>>>>> >>>-@code{@var{async-record} | @var{stream-record}}
>>>>>> >>>+@code{( @var{async-record} | @var{stream-record} ) @var{nl}}
>>>
>>>> >
>>>> >
>>>> >I'm dubious about this.
>>>> >
>>>> >stream-record does not have an NL terminator and needs one, yes.
>>>> >
>>>> >But async-record already gets an NL terminator in the grammar
>>>> >and does not need a second one.
>>
>>> 
>>> That's kind of why, per my earlier post, I suggested moving all the 
>>> @var{nl} to the @var{output} production.  That way we can see exactly 
>>> where they fit in.
> 
> 
> Andrew, were you suggesting something like this?
> 
> from
>    output ==> ( out-of-band-record )* [ result-record ] "(gdb)" nl
> to
>    output ==> (out-of-band-record nl)* [ result-record nl] "(gdb)" nl
> 
> and removing the 'nl' everywhere else?

Yep.

> That might actually work. Although, I don't personally know a way of
> changing a grammar and guaranteeing that there the same.

A series of rewrites where NL is slow pushed down should eventually 
result in the old grammar (well except that it would be fixed).

Andrew




More information about the Gdb-patches mailing list