Subject: Re: Notational Convention for BNF in HyperSpec
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 25 Sep 2007 22:32:08 -0500
Newsgroups: comp.lang.lisp
Message-ID: <c7adnfHJ_5AlT2TbnZ2dnUVZ_hCdnZ2d@speakeasy.net>
George Neuner  <gneuner2/@comcast.net> wrote:
+---------------
| <joshuaaaron@gmail.com> wrote:
| >case keyform {normal-clause}* [otherwise-clause] => result*
...
| >
| >Why {normal-clause}* rather than just normal-clause*? ...
| 
| By convention a token surrounded by curly braces indicates a named
| substitution - in this case the token, "normal-clause", should be the
| name of another production within the grammar.
+---------------

Also see CLHS 1.4.1.2.3 "Additional Uses for Indirect Definitions
in Modified BNF Syntax" [which conveniently uses CASE as an example!],
where it notes that some of those "other productions" might be unused
in the formal grammar on the page where they're defined... but might
be referenced in the formal grammar elsewhere, or informally in the
descriptive text.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607