Topic: C++ Punctuators
Author: "Jeff Perry" <jsp@mail.utexas.edu>
Date: 2000/03/10 Raw View
In the Grammar section of The C++ Programming Language, Third Editition, by
Bjarne Stroustrup, on page 795, it says:
token:
identifier
keyword
literal
operator
punctuator
But what is a punctuator? I don't see it listed elsewhere in the grammar.
Am I just missing it, or is it really not defined anywhere?
Thanks,
Jeff
jsp@mail.utexas.edu
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Ed" <wicheed@lineone.net>
Date: 2000/03/10 Raw View
I think it must mean a character that is used for punctuation, and not as an
operator. For example, the semicolon is used to signify end-of-statement.
regards
Ed
Jeff Perry <jsp@mail.utexas.edu> wrote in message
news:8a8ian$gaf$1@geraldo.cc.utexas.edu...
> In the Grammar section of The C++ Programming Language, Third Editition,
by
> Bjarne Stroustrup, on page 795, it says:
>
> token:
> identifier
> keyword
> literal
> operator
> punctuator
>
> But what is a punctuator? I don't see it listed elsewhere in the grammar.
> Am I just missing it, or is it really not defined anywhere?
>
> Thanks,
> Jeff
> jsp@mail.utexas.edu
>
>
>
>
> ---
> [ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]
>
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Victor Bazarov" <vAbazarov@dAnai.com>
Date: 2000/03/10 Raw View
"Jeff Perry" <jsp@mail.utexas.edu> wrote...
> In the Grammar section of The C++ Programming Language, Third Editition,
by
> Bjarne Stroustrup, on page 795, it says:
>
> token:
> identifier
> keyword
> literal
> operator
> punctuator
>
> But what is a punctuator? I don't see it listed elsewhere in the grammar.
> Am I just missing it, or is it really not defined anywhere?
:-) It can't be "not defined anywhere". However, it's rather hidden.
See "preprocessing-op-or-punc". The Standard, clause 2.12.
Victor
--
Please remove capital A's from my address when replying by mail
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Martin von Loewis <loewis@informatik.hu-berlin.de>
Date: 2000/03/10 Raw View
"Jeff Perry" <jsp@mail.utexas.edu> writes:
> But what is a punctuator? I don't see it listed elsewhere in the grammar.
> Am I just missing it, or is it really not defined anywhere?
It really is not defined, and missing not only in the book, but also
in the standard. See Core Issue 189, at
http://www.informatik.hu-berlin.de/~loewis/corer9.html#189
Apparently, the intent is that a punctuator everything in
preprocessing op or punc that is not an operator, where the definition
of operator is also missing :-)
Martin
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Francis Glassborow <francis@robinton.demon.co.uk>
Date: 2000/03/11 Raw View
In article <8a8ian$gaf$1@geraldo.cc.utexas.edu>, Jeff Perry
<jsp@mail.utexas.edu> writes
>In the Grammar section of The C++ Programming Language, Third Editition, by
>Bjarne Stroustrup, on page 795, it says:
>
> token:
> identifier
> keyword
> literal
> operator
> punctuator
>
>But what is a punctuator? I don't see it listed elsewhere in the grammar.
>Am I just missing it, or is it really not defined anywhere?
Well the Standard gives a listing of all operators and punctuators so a
punctuator is any one of these that is either not an operator or is used
in a context where it is not an operator. For example ; is always a
punctuator while , can be either depending on context.
Francis Glassborow Journal Editor, Association of C & C++ Users
64 Southfield Rd
Oxford OX4 1PA +44(0)1865 246490
All opinions are mine and do not represent those of any organisation
---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html ]