From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14352 invoked by alias); 26 Aug 2004 23:06:03 -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 14307 invoked from network); 26 Aug 2004 23:06:00 -0000 Received: from unknown (HELO hall.mail.mindspring.net) (207.69.200.60) by sourceware.org with SMTP; 26 Aug 2004 23:06:00 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by hall.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1C0TJR-0006wR-00; Thu, 26 Aug 2004 19:05:46 -0400 Received: from mindspring.com (localhost [127.0.0.1]) by berman.michael-chastain.com (Postfix) with SMTP id 135C64B102; Thu, 26 Aug 2004 19:05:47 -0400 (EDT) Date: Thu, 26 Aug 2004 23:06:00 -0000 From: Michael Chastain To: bob@brasko.net Subject: Re: GDB/MI Output Syntax Cc: gdb@sources.redhat.com Message-ID: <412E6CCA.nail8HL41TTOO@mindspring.com> References: <20040825154348.GA19533@white> <412CB6B6.nail1DX11BPYQ@mindspring.com> <20040825193659.GA19945@white> <412DED43.nail3XH31S08T@mindspring.com> <20040826183134.GA20902@white> <412E4B96.nailMU21D4LDE@mindspring.com> <20040826220352.GB21451@white> In-Reply-To: <20040826220352.GB21451@white> 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/msg00409.txt.bz2 Bob Rossi wrote: > I would prefer remove all string literals. Or make rules for them. > gdb -> "(gdb)" > done -> "done" Perhaps: GDB -> "(gdb)" DONE -> "done" and say that the lexer is responsible for recognizing these and returning those tokens. > My lexer ignores whitespace, > [ \t\v\f] {} > is this bad? It surprised me because newlines are at the parse level, so I wasn't expecting to find white space eaten at the lexer level. With your grammar, new line in the wrong place is a syntax error, but tab in the wrong place is not. Actually it's probably fine. If we really want to spec the language, the doco has to list the terminals that come out of the lexer and describe some of the lexer's behavior, like eating white space, and what characters are quoted in a C_STRING ("just like C" ... easy answer). Speaking of nailing things down ... your grammar doesn't define epsilon! epsilon ->