From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16033 invoked by alias); 23 Aug 2004 21:42:51 -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 16022 invoked from network); 23 Aug 2004 21:42:50 -0000 Received: from unknown (HELO barry.mail.mindspring.net) (207.69.200.25) by sourceware.org with SMTP; 23 Aug 2004 21:42:50 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1BzMaX-0001Tk-00; Mon, 23 Aug 2004 17:42:49 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 71B4F4B102; Mon, 23 Aug 2004 17:43:05 -0400 (EDT) Date: Mon, 23 Aug 2004 21:42:00 -0000 From: Michael Chastain To: gdb@sources.redhat.com, drow@false.org Subject: Re: GDB/MI Output Syntax ambiguity Message-ID: <412A64E9.nailD781GRTXW@mindspring.com> References: <20040823210314.GA15374@white> <20040823210924.GA22417@nevyn.them.org> In-Reply-To: <20040823210924.GA22417@nevyn.them.org> User-Agent: nail 10.8 6/28/04 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00303.txt.bz2 It's been a while since I wrote a yacc grammar, but my inclination would be to enhance the lexer and distinguish some new terminals: TOKEN-UPARROW TOKEN-STAR TOKEN-PLUS TOKEN-EQUALS Then the grammar goes from LALR(2) to LALR(1), because result-record can start with TOKEN-UPARROW, which is just one symbol, rather than token "^", which is two symbols. That ought to make it yacc-parseable. That keeps the token numbers in the natural place. With drow's rule: output -> [token] ( out-of-band-record-1 [token] )* [ result-record ] "(gdb)" nl This is also LALR(1), but the token symbol is not bundled with the wrong out-of-band-record-1, so the tree-value-constructing code gets a little skewed. But I'm rusty on all this.