\infannex{gram}{Grammar summary}

\begin{paras}

\pnum
\index{grammar}%
\index{summary, syntax}%
This summary of \Cpp\  syntax is intended to be an aid to comprehension.
It is not an exact statement of the language.
In particular, the grammar described here accepts
a superset of valid \Cpp\  constructs.
Disambiguation rules (\ref{stmt.ambig}, \ref{dcl.spec}, \ref{class.member.lookup})
must be applied to distinguish expressions from declarations.
Further, access control, ambiguity, and type rules must be used
to weed out syntactically valid but meaningless constructs.

\rSec1[gram.key]{Keywords}

\pnum
\index{keyword}%
New context-dependent keywords are introduced into a program by
\tcode{typedef}~(\ref{dcl.typedef}),
\tcode{namespace}~(\ref{namespace.def}),
\tcode{class}~(clause \ref{class}), \tcode{enumeration}~(\ref{dcl.enum}), and
\tcode{template}~(clause \ref{temp})
declarations.

\begin{bnf}
typedef-name:\br
	identifier
\end{bnf}

\begin{bnf}
namespace-name:\br
	original-namespace-name\br
	namespace-alias

original-namespace-name:\br
	identifier

namespace-alias:\br
	identifier
\end{bnf}

\begin{bnf}
class-name:\br
	identifier\br
	simple-template-id
\end{bnf}

\begin{bnf}
enum-name:\br
	identifier
\end{bnf}

\begin{bnf}
template-name:\br
	identifier
\end{bnf}

Note that a
\textit{typedef-name}\ 
naming a class is also a
\textit{class-name}\ 
(\ref{class.name}).

\end{paras}

% machine generated after this line; do not edit
