nondigit
We say that a string s is a nondigit when it is one of the following characters:
| a | b | c | d | e | f | g | h | i | j | k | l | m | |
| n | o | p | q | r | s | t | u | v | w | x | y | z | |
| A | B | C | D | E | F | G | H | I | J | K | L | M | |
| N | O | P | Q | R | S | T | U | V | W | X | Y | Z | _ |
digit
We say that a string s is a digit when it is one of the following characters:
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
integer-literal
We say that a string s is an integer-literal when it is any of the following:
primary-expression
We say that a string s is a primary-expression when it is any of the following:
postfix-expression
We say that a string s is a postfix-expression when it is any of the following:
- primary-expression
-
postfix-expression
[ expression-list
opt] -
postfix-expression
( expression-list
opt) -
simple-type-specifier
( expression-list
opt) -
typename-specifier
( expression-list
opt) - simple-type-specifier braced-init-list
- typename-specifier braced-init-list
-
postfix-expression
.
template
optid-expression - postfix-expression . splice-expression
-
postfix-expression
->
template
optid-expression - postfix-expression -> splice-expression
- postfix-expression ++
- postfix-expression --
- dynamic_cast < type-id > ( expression )
- static_cast < type-id > ( expression )
- reinterpret_cast < type-id > ( expression )
- const_cast < type-id > ( expression )
- typeid ( expression )
- typeid ( type-id )
unary-expression
We say that a string s is a unary-expression when it is any of the following:
- postfix-expression
- unary-operator cast-expression
- ++ cast-expression
- -- cast-expression
- await-expression
- sizeof unary-expression
- sizeof ( type-id )
- sizeof ... ( identifier )
- alignof ( type-id )
- noexcept-expression
- new-expression
- delete-expression
- reflect-expression
cast-expression
We say that a string s is a cast-expression when it is any of the following:
pm-expression
We say that a string s is a pm-expression when it is any of the following:
multiplicative-expression
We say that a string s is a multiplicative-expression when it is any of the following:
additive-expression
We say that a string s is an additive-expression when it is any of the following:
shift-expression
We say that a string s is a shift-expression when it is any of the following:
compare-expression
We say that a string s is a compare-expression when it is any of the following:
relational-expression
We say that a string s is a relational-expression when it is any of the following:
equality-expression
We say that a string s is an equality-expression when it is any of the following:
and-expression
We say that a string s is an and-expression when it is any of the following:
exclusive-or-expression
We say that a string s is an exclusive-or-expression when it is any of the following:
inclusive-or-expression
We say that a string s is an inclusive-or-expression when it is any of the following:
logical-and-expression
We say that a string s is a logical-and-expression when it is any of the following:
logical-or-expression
We say that a string s is a logical-or-expression when it is any of the following:
conditional-expression
We say that a string s is a conditional-expression when it is any of the following:
assignment-expression
We say that a string s is an assignment-expression when it is any of the following:
expression
We say that a string s is an expression when it is any of the following:
identifier-start
We say that a string s is an identifier-start when it is any of the following:
identifier-continue
We say that a string s is an identifier-continue when it is any of the following:
operator
We say that a string s is an operator when it is any of the following:
| new | delete | new[] | delete[] |
| co_await | ( ) | [ ] | -> |
| ->* | ~ | ! | + |
| - | * | / | % |
| ^ | & | | | = |
| += | -= | *= | /= |
| %= | ^= | &= | |= |
| == | != | < | > |
| <= | >= | <=> | && |
| || | << | >> | <<= |
| >>= | ++ | -- | , |
operator-function-id
We say that a string s is an operator-function-id when it is any of the following:
-
operatoroperator
template-argument-name
We say that a string s is a template-argument-name when it is any of the following:
nested-name-specifier
We say that a string s is a nested-name-specifier when it is any of the following:
- ::
- type-name ::
- namespace-name ::
- computed-type-specifier ::
- splice-scope-specifier ::
- nested-name-specifier identifier ::
-
nested-name-specifier
template
optsimple-template-id ::
namespace-name
We say that a string s is a namespace-name when it is any of the following:
computed-type-specifier
We say that a string s is a computed-type-specifier when it is any of the following:
nested-name-specifier
We say that a string s is a nested-name-specifier when it is any of the following:
- ::
- type-name ::
- namespace-name ::
- computed-type-specifier ::
- splice-scope-specifier ::
- nested-name-specifier identifier ::
-
nested-name-specifier
template
optsimple-template-id ::
template-argument
We say that a string s is a template-argument when it is any of the following:
template-argument-list
We say that a string s is a template-argument-list when it is any of the following:
-
template-argument
...opt -
template-argument-list,
template-argument
...
simple-template-id
We say that a string s is a simple-template-id when it consists of the following:
type-name
We say that a string s is a type-name when it is any of the following:
simple-type-specifier
We say that a string s is a simple-type-specifier when it is any of the following:
- nested-name-specifier
opttype-name - nested-name-specifier template simple-template-id
- computed-type-specifier
- placeholder-type-specifier
- nested-name-specifier
opttemplate-name - char
- char8_t
- char16_t
- char32_t
- wchar_t
- bool
- short
- int
- long
- signed
- unsigned
- float
- double
- void
identifier
We say that a string s is an identifier when it is any of the following:
Examples
myVarmy_varcan use underscore_hiddencan start with underscorefoo123can contain digits after the first characterΩmegacan include Unicode letters
Non-examples
123abccannot start with a digitvar-namehyphens are not allowed!importantspecial characters like ! are not allowed(space) whitespace is not allowed
unqualified-id
We say that a string s is an unqualified-id when it is any of the following:
id-expression
We say that a string s is an id-expression when it is any of the following: