From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16343 invoked by alias); 24 Aug 2004 19:07:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 16299 invoked from network); 24 Aug 2004 19:07:20 -0000 Received: from unknown (HELO lakermmtao06.cox.net) (68.230.240.33) by sourceware.org with SMTP; 24 Aug 2004 19:07:20 -0000 Received: from white ([68.9.64.121]) by lakermmtao06.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP id <20040824190640.XBHY4710.lakermmtao06.cox.net@white>; Tue, 24 Aug 2004 15:06:40 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1Bzgcy-0004ca-00; Tue, 24 Aug 2004 15:06:40 -0400 Date: Tue, 24 Aug 2004 19:07:00 -0000 From: Bob Rossi To: Andrew Cagney Cc: Michael Chastain , gdb@sources.redhat.com Subject: Re: GDB/MI Output Syntax Message-ID: <20040824190640.GA17542@white> Mail-Followup-To: Andrew Cagney , Michael Chastain , gdb@sources.redhat.com References: <20040824031242.GA15980@white> <412AC0DC.nailDS61X8G63@mindspring.com> <412B8FB9.5040704@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412B8FB9.5040704@gnu.org> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-08/txt/msg00340.txt.bz2 On Tue, Aug 24, 2004 at 02:58:01PM -0400, Andrew Cagney wrote: > >Bob Rossi 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