From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19472 invoked by alias); 25 Sep 2009 12:53:38 -0000 Received: (qmail 19464 invoked by uid 22791); 25 Sep 2009 12:53:37 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Sep 2009 12:53:32 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1MrAIS-0001kT-TP for gdb-patches@sources.redhat.com; Fri, 25 Sep 2009 14:53:12 +0200 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Sep 2009 14:53:12 +0200 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 25 Sep 2009 14:53:12 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [PATCH:doc] GDB/MI attribute names Date: Fri, 25 Sep 2009 12:53:00 -0000 Message-ID: References: <19131.17428.428101.481874@totara.tehura.co.nz> <19132.47302.194071.325914@totara.tehura.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00789.txt.bz2 Nick Roberts wrote: > > > How about: > > > > > > @var{variable} names should be specified as a sequence of alphabetic > > > characters and underscores. > > > > It seem to me to introduce too many indirection levels. We don't have something > > called 'variable' that also has name, that is also 'specified' by something > > separate. Why not: > > > > The @var{variable} nonterminal in the above grammar may contain only > > alphanumeric characters or the underscore character. > > > > ? This is probably not 100% accurate either, since nonterminals do not > > contain characters but have terminal strings derived from them, which > > strings consist of characters, but I presume we're not writing a PhD here > > ;-) > > I had to look up `nonterminal' in Wikipedia where it talks about > Backus?Naur Form. Having read that, > > should be specified as a sequence of alphabetic > characters and underscores. That's again using the word 'specified', as if VARIABLE is something you write specification for, and you are restricted in how you can write such specification. Rather, VARIABLE *is* a sequence of alphabetic characters and underscores. Anyway, this is probably too minor for me to further complain about. > seems good to me. Apparently it's a widely used syntax and it looks familiar > to me, e.g., the git manpages and we could use it for existing documentation, > e.g., > > ::= [ ] "^" ( "," )* > > rather than the currently ad-hoc(?) metasyntax. In fact, the current convention is just as good as putting nonterminal names in angle brackets. BTW, probably the best way to fix documentation is actually define 'string'. We have definition for c-string: c-string ==> """ seven-bit-iso-c-string-content """ and can add this: string ==> """ ( letter | digit | "_" ) * """ This is much more formal than anything else we can say. - Volodya