Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bob Rossi <bob@brasko.net>
To: Andrew Cagney <cagney@gnu.org>
Cc: Michael Chastain <mec.gnu@mindspring.com>, gdb@sources.redhat.com
Subject: Re: GDB/MI Output Syntax
Date: Tue, 24 Aug 2004 19:07:00 -0000	[thread overview]
Message-ID: <20040824190640.GA17542@white> (raw)
In-Reply-To: <412B8FB9.5040704@gnu.org>

On Tue, Aug 24, 2004 at 02:58:01PM -0400, Andrew Cagney wrote:
> >Bob Rossi <bob@brasko.net> wrote:
> >
> >  ~"GNU gdb 6.1-debian\n"
> >  ~"Copyright 2004 Free Software Foundation, Inc.\n"
> >  ~"GDB is free software, covered by the GNU General Public License, and 
> >  you are\n"
> >  ~"welcome to change it and/or distribute copies of it under certain 
> >  conditions.\n"
> >  ~"Type \"show copying\" to see the conditions.\n"
> >  ~"There is absolutely no warranty for GDB.  Type \"show warranty\" for 
> >  details.\n"
> >  ~"This GDB was configured as \"i386-linux\"."
> >  ~"\n"
> >  (gdb) 
> >
> >This looks almost okay to me, it's just got a few differences with
> >newline characters versus the grammar
> >
> >  output -> (out-of-band-record)* [result-record] "gdb" NL
> >  (out-of-band-record)* -> stream_record stream_record stream_record 
> >  stream_record stream_record stream_record stream_record stream_record
> >  stream_record -> console_stream_output
> >  console_stream_output -> "~" C_STRING
> >  [result-record] ->
> >
> >It is eight stream-records in a row, where each stream-record is a
> >console-stream-output.  The gotcha is that the grammar as written does
> >not allow for a NL after a console-stream-output or a stream-record.
> 
> That's clearly a bug in the doco.  Any half decent compiler construction 
> course will use a new grammer each year (while stopping cheats, also 
> means that the students get to flush out a few bugs :-).

OK, so we can add that to the doco? I'll submit a patch.

> -> should all the [missing] @var{nl} be moved to @var{output}, that way 
> the're all in the one place.
> 
> Rossi writes:
> >Yes, this could work. However, was the original grammer meant to be
> >LALR(2)?
> 
> rewritable into something needing only one level of look-ahead, which I 
> see is being done.

Andrew, Michael has helped me figure out a more efficient way to reduce
the grammar. Now I have a LL(1) parser that has no conflicts, without
playing games in the lexer.

Also, a word of good news, so far I have sent several 'output' commands
of GDB through the parser, and it likes the syntax! This is a good thing
in my opinion, and so far, something to be thankful for :)

I would greatly appreciate it if we could validate GDB's output with the
library I am currently working on. I would love to know that everything
GDB outputs is sanitary. Anyways, the next step for me is to write a
syntax tree, representing the output. From there, I will be able to get
some work done on my front end.

Thanks,
Bob Rossi


  reply	other threads:[~2004-08-24 19:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24  3:12 Bob Rossi
2004-08-24  4:15 ` Michael Chastain
2004-08-24 12:30   ` Bob Rossi
2004-08-24 12:50     ` Michael Chastain
2004-08-24 18:59   ` Andrew Cagney
2004-08-24 19:07     ` Bob Rossi [this message]
2004-08-25 15:44 Bob Rossi
2004-08-25 15:57 ` Michael Chastain
2004-08-25 19:37   ` Bob Rossi
2004-08-26 14:01     ` Michael Chastain
2004-08-26 18:31       ` Bob Rossi
2004-08-26 20:44         ` Michael Chastain
2004-08-26 20:52           ` Keith Seitz
2004-08-26 22:16             ` Michael Chastain
2004-08-26 22:03           ` Bob Rossi
2004-08-26 23:06             ` Michael Chastain
2004-08-26 21:13 ` Andrew Cagney
2004-08-26 21:25   ` Bob Rossi
2004-08-26 22:46     ` Michael Chastain
2004-08-27 10:14       ` Eli Zaretskii
2004-08-26 22:41   ` Michael Chastain
     [not found] <1093622671.2836.ezmlm@sources.redhat.com>
2004-08-27 17:56 ` Jim Ingham
2004-08-27 19:12   ` Michael Chastain
2005-01-05 23:27     ` Bob Rossi
2005-01-06  4:48       ` Eli Zaretskii
2005-01-06 23:31         ` Bob Rossi
2005-01-07  0:36           ` Jim Ingham
2005-01-07  1:12             ` Bob Rossi
2005-01-07  3:12               ` Russell Shaw
2005-01-11 19:35                 ` Bob Rossi
2005-01-13  2:23                   ` Bob Rossi
2005-01-06  0:28 Paul Schlie
2005-01-06  0:32 ` Kip Macy
2005-01-06  0:49   ` Paul Schlie
2005-01-06  1:10 ` Bob Rossi
2005-01-06  1:36   ` Paul Schlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040824190640.GA17542@white \
    --to=bob@brasko.net \
    --cc=cagney@gnu.org \
    --cc=gdb@sources.redhat.com \
    --cc=mec.gnu@mindspring.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox