From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29121 invoked by alias); 24 Aug 2004 12:36:17 -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 29109 invoked from network); 24 Aug 2004 12:36:14 -0000 Received: from unknown (HELO lakermmtao04.cox.net) (68.230.240.35) by sourceware.org with SMTP; 24 Aug 2004 12:36:14 -0000 Received: from white ([68.9.64.121]) by lakermmtao04.cox.net (InterMail vM.6.01.03.02.01 201-2131-111-104-103-20040709) with ESMTP id <20040824123613.DHKZ4754.lakermmtao04.cox.net@white>; Tue, 24 Aug 2004 08:36:13 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1BzaX7-0004NO-00; Tue, 24 Aug 2004 08:36:13 -0400 Date: Tue, 24 Aug 2004 12:36:00 -0000 From: Bob Rossi To: Michael Chastain Cc: gdb@sources.redhat.com Subject: Re: GDB/MI Output Syntax ambiguity Message-ID: <20040824123613.GC16751@white> Mail-Followup-To: Michael Chastain , gdb@sources.redhat.com References: <20040823210314.GA15374@white> <412ABC62.nailDPO16U0B2@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <412ABC62.nailDPO16U0B2@mindspring.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-08/txt/msg00314.txt.bz2 On Mon, Aug 23, 2004 at 11:56:18PM -0400, Michael Chastain wrote: > [Shout out to Paul Hilfinger, who was my professor in compiler class, > Spring 1983, UC Berkeley!] > > The grammar in gdb.info from gdb 6.2 has stuff like (foo)* and [bar] and is > not quite low-level enough for bison input. > > I made a grammar out of it by expanding the (foo)* and [bar] stuff > with rules. Appended is my grammar as I typed it in. I will compare the grammar more in detail. However, these are the 5 rules I applied to get the MI grammar to not have any left recursions. 1. (out-of-band-record)* -> out-of-band-record-prime -> out-of-band-record-list | epsilon out-of-band-record-list -> out-of-band-record-list out-of-band-record | out-of-band-record 2. [result-record] possible-result-record -> result-record | epsilon 3. [token] possible-token -> token | epsilon 4. ( "," result )* result-list-prime -> result-list | epsilon result-list -> result-list "," result | "," result 5. ( "," value )* value-list-prime -> value-list | epsilon value-list -> value-list "," value | "," value Other than that, I think it's all still the same. I will compare the grammars in more detail today. Thanks for putting in the great effort! Bob Rossi