Topic: Defect Report: identifier-list is never defined


Author: Nicola.Musatti@ObjectWay.it (Nicola Musatti)
Date: 17 Dec 02 07:04:09 GMT
Raw View
 [Moderator's note: this defect report has been
 forwarded to the C++ committee. -moderator.]

In clause 16 [cpp], paragraph 1, the 'control-line' non-terminal symbol
is defined in terms of the 'identifier-list' non-terminal, which is
never defined within the standard document.

The same definition is repeated in clause A.14 [gram.cpp].

I suggest that the following definition is added to clause 16 [cpp],
paragraph 1, after the one for 'replacement-list':

identifier-list:
      identifier
      identifier-list , identifier

This should be repeated again in clause A.14 [gram.cpp], again after the
one for 'replacement-list'. It might also be desirable to include a
third repetition in clause 16.3 [cpp.replace], paragraph 9.

Cheers,
Nicola Musatti
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]




Author: gennaro_prota@yahoo.com (Gennaro Prota)
Date: Tue, 17 Dec 2002 22:47:40 +0000 (UTC)
Raw View
On 17 Dec 02 07:04:09 GMT, Nicola.Musatti@ObjectWay.it (Nicola
Musatti) wrote:

> [Moderator's note: this defect report has been
> forwarded to the C++ committee. -moderator.]
>
>In clause 16 [cpp], paragraph 1, the 'control-line' non-terminal symbol
>is defined in terms of the 'identifier-list' non-terminal, which is
>never defined within the standard document.

Interesting. Clause 16 of the C++ standard is almost copied from the C
standard, however the latter uses the notion of identifier-list for
function declarations too (non prototypes) and has the grammar in the
paragraph about declarators. Once you get rid of that, the only
remaining usage of identifier-list is in preprocessing. Note anyway
that in the case of C there's a "reuse" of the definition for two
different things: "list of identifiers" and "list of preprocessing
token identifiers" (similarly both standards reuse the definition of
identifier).

>The same definition is repeated in clause A.14 [gram.cpp].

Hmmm... probably clause A is automatically generated by extracting the
parts of the standard that are "tagged" as grammar definitions: does
anybody know whether it is so?

Genny.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]