-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1130 from guwirth/cpp17/selection-statement
Cpp17/selection statement
- Loading branch information
Showing
9 changed files
with
2,935 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
namespace-name: | ||
identifier | ||
namespace-alias | ||
|
||
pp-number: | ||
digit | ||
. digit | ||
pp-number digit | ||
pp-number identifier-nondigit | ||
pp-number � digit | ||
pp-number � nondigit | ||
pp-number e sign | ||
pp-number E sign | ||
pp-number p sign | ||
pp-number P sign | ||
pp-number . | ||
|
||
hexadecimal-literal: | ||
hexadecimal-prefix hexadecimal-digit-sequence | ||
|
||
hexadecimal-prefix: one of | ||
0x 0X | ||
|
||
hexadecimal-digit-sequence: | ||
hexadecimal-digit | ||
hexadecimal-digit-sequence �opt hexadecimal-digit | ||
|
||
floating-literal: | ||
decimal-floating-literal | ||
hexadecimal-floating-literal | ||
|
||
decimal-floating-literal: | ||
fractional-constant exponent-partopt floating-suffixopt | ||
digit-sequence exponent-part floating-suffixopt | ||
|
||
hexadecimal-floating-literal: | ||
hexadecimal-prefix hexadecimal-fractional-constant binary-exponent-part floating-suffixopt | ||
hexadecimal-prefix hexadecimal-digit-sequence binary-exponent-part floating-suffixopt | ||
|
||
hexadecimal-fractional-constant: | ||
hexadecimal-digit-sequenceopt . hexadecimal-digit-sequence | ||
hexadecimal-digit-sequence . | ||
|
||
binary-exponent-part: | ||
p signopt digit-sequence | ||
P signopt digit-sequence | ||
|
||
user-defined-floating-literal: | ||
fractional-constant exponent-partopt ud-suffix | ||
digit-sequence exponent-part ud-suffix | ||
hexadecimal-prefix hexadecimal-fractional-constant binary-exponent-part ud-suffix | ||
hexadecimal-prefix hexadecimal-digit-sequence binary-exponent-part ud-suffix | ||
|
||
simple-capture: | ||
identifier | ||
& identifier | ||
this | ||
* this | ||
|
||
lambda-declarator: | ||
( parameter-declaration-clause ) decl-specifier-seqopt | ||
noexcept-specifieropt attribute-specifier-seqopt trailing-return-typeopt | ||
|
||
postfix-expression: | ||
primary-expression | ||
postfix-expression [ expr-or-braced-init-list ] | ||
postfix-expression ( expression-listopt ) | ||
simple-type-specifier ( expression-listopt ) | ||
typename-specifier ( expression-listopt ) | ||
simple-type-specifier braced-init-list | ||
typename-specifier braced-init-list | ||
postfix-expression . templateopt id-expression | ||
postfix-expression -> templateopt id-expression | ||
postfix-expression . pseudo-destructor-name | ||
postfix-expression -> pseudo-destructor-name | ||
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 ) | ||
|
||
labeled-statement: | ||
attribute-specifier-seqopt identifier : statement | ||
attribute-specifier-seqoptcase constant-expression : statement | ||
attribute-specifier-seqoptdefault : statement | ||
|
||
iteration-statement: | ||
while ( condition ) statement | ||
do statement while ( expression ) ; | ||
for ( init-statement conditionopt ; expressionopt ) statement | ||
for ( for-range-declaration : for-range-initializer ) statement | ||
|
||
for-range-declaration: | ||
attribute-specifier-seqopt decl-specifier-seq declarator | ||
attribute-specifier-seqopt decl-specifier-seq ref-qualifieropt [ identifier-list ] | ||
|
||
for-range-initializer: | ||
expr-or-braced-init-list | ||
|
||
jump-statement: | ||
break ; | ||
continue ; | ||
return expr-or-braced-init-listopt ; | ||
goto identifier ; | ||
|
||
declaration: | ||
block-declaration | ||
nodeclspec-function-declaration | ||
function-definition | ||
template-declaration | ||
deduction-guide | ||
explicit-instantiation | ||
explicit-specialization | ||
linkage-specification | ||
namespace-definition | ||
empty-declaration | ||
attribute-declaration | ||
|
||
nodeclspec-function-declaration: | ||
attribute-specifier-seqopt declarator ; | ||
|
||
alias-declaration: | ||
using identifier attribute-specifier-seqopt = defining-type-id ; | ||
|
||
simple-declaration: | ||
decl-specifier-seq init-declarator-listopt ; | ||
attribute-specifier-seq decl-specifier-seq init-declarator-list ; | ||
attribute-specifier-seqopt decl-specifier-seq ref-qualifieropt [ identifier-list ] initializer ; | ||
|
||
decl-specifier: | ||
storage-class-specifier | ||
defining-type-specifier | ||
function-specifier | ||
friend | ||
typedef | ||
constexpr | ||
inline | ||
|
||
function-specifier: | ||
virtual | ||
explicit | ||
|
||
type-specifier: | ||
simple-type-specifier | ||
elaborated-type-specifier | ||
typename-specifier | ||
cv-qualifier | ||
|
||
defining-type-specifier: | ||
type-specifier | ||
class-specifier | ||
enum-specifier | ||
|
||
defining-type-specifier-seq: | ||
defining-type-specifier attribute-specifier-seqopt | ||
defining-type-specifier defining-type-specifier-seq | ||
|
||
simple-type-specifier: | ||
nested-name-specifieropt type-name | ||
nested-name-specifier template simple-template-id | ||
nested-name-specifieropt template-name | ||
char | ||
char16_t | ||
char32_t | ||
wchar_t | ||
bool | ||
short | ||
int | ||
long | ||
signed | ||
unsigned | ||
float | ||
double | ||
void | ||
auto | ||
decltype-specifier | ||
|
||
enum-head: | ||
enum-key attribute-specifier-seqopt enum-head-nameopt enum-baseopt | ||
|
||
enum-head-name: | ||
nested-name-specifieropt identifier | ||
|
||
opaque-enum-declaration: | ||
enum-key attribute-specifier-seqopt nested-name-specifieropt identifier enum-baseopt ; | ||
|
||
using-declaration: | ||
using using-declarator-list ; | ||
|
||
using-declarator-list: | ||
using-declarator ...opt | ||
using-declarator-list , using-declarator ...opt | ||
|
||
using-declarator: | ||
typenameopt nested-name-specifier unqualified-id | ||
|
||
attribute-specifier: | ||
[ [ attribute-using-prefixopt attribute-list ] ] | ||
alignment-specifier | ||
|
||
alignment-specifier: | ||
alignas ( type-id ...opt ) | ||
alignas ( constant-expression ...opt ) | ||
attribute-using-prefix : | ||
using attribute-namespace : | ||
|
||
attribute-argument-clause: | ||
( balanced-token-seqopt ) | ||
|
||
balanced-token-seq: | ||
balanced-token | ||
balanced-token-seq balanced-token | ||
|
||
balanced-token: | ||
( balanced-token-seqopt ) | ||
[ balanced-token-seqopt ] | ||
{ balanced-token-seqopt } | ||
any token other than a parenthesis, a bracket, or a brace | ||
|
||
parameters-and-qualifiers: | ||
( parameter-declaration-clause ) cv-qualifier-seqopt | ||
ref-qualifieropt noexcept-specifieropt attribute-specifier-seqopt | ||
|
||
trailing-return-type: | ||
-> type-id | ||
|
||
defining-type-id: | ||
defining-type-specifier-seq abstract-declaratoropt | ||
|
||
expr-or-braced-init-list: | ||
expression | ||
braced-init-list | ||
|
||
member-declaration: | ||
attribute-specifier-seqopt decl-specifier-seqopt member-declarator-listopt ; | ||
function-definition | ||
using-declaration | ||
static_assert-declaration | ||
template-declaration | ||
deduction-guide | ||
alias-declaration | ||
empty-declaration | ||
|
||
deduction-guide: | ||
explicitopt template-name ( parameter-declaration-clause ) -> simple-template-id ; | ||
|
||
noexcept-specifier: | ||
noexcept ( constant-expression ) | ||
noexcept | ||
throw ( ) | ||
|
||
group-part: | ||
if-section | ||
control-line | ||
text-line | ||
# conditionally-supported-directive | ||
|
||
conditionally-supported-directive: | ||
pp-tokens new-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.