This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: GDB/MI Output syntax
On Tue, Aug 24, 2004 at 04:16:44PM -0400, Andrew Cagney wrote:
> >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).
By the way you are talking, I can't tell if you are going to do this, or
if you expect someone else to do it?
Should I just post a new grammar with the suggestion? The problem is, I
don't know how to prove that the new grammar is equivalant to the old
grammar. Is there a way to do that?
Thanks,
Bob Rossi