コンテンツにスキップ

利用者:Ef3/C.N2596.BNF

出典: フリー教科書『ウィキブックス(Wikibooks)』
token
keyword
identifier
constant
string-literal
punctuator
preprocessing-token
header-name
identifier
pp-number
character-constant
string-literal
punctuator
each non-white-space character that cannot be one of the above
keyword
auto
break
case
char
const
continue
default
do
double
else
enum
extern
float
for
goto
if
inline
int
long
register
restrict
return
short
signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while
_Alignas
_Alignof
_Atomic
_Bool
_Complex
_Decimal128
_Decimal32
_Decimal64
_Generic
_Imaginary
_Noreturn
_Static_assert
_Thread_local
identifier
identifier-nondigit
identifier identifier-nondigit
identifier digit
identifier-nondigit
nondigit
universal-character-name
other implementation-defined characters
nondigit
_ 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
0 1 2 3 4 5 6 7 8 9
universal-character-name
\u hex-quad
\U hex-quad hex-quad
hex-quad
hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
constant
integer-constant
floating-constant
enumeration-constant
character-constant
integer-constant
decimal-constant integer-suffixopt
octal-constant integer-suffixopt
hexadecimal-constant integer-suffixopt
decimal-constant
nonzero-digit
decimal-constant digit
octal-constant
0
octal-constant octal-digit
hexadecimal-constant
hexadecimal-prefix hexadecimal-digit
hexadecimal-constant hexadecimal-digit
hexadecimal-prefix
0x 0X
nonzero-digit
1 2 3 4 5 6 7 8 9
octal-digit
0 1 2 3 4 5 6 7
hexadecimal-digit
0 1 2 3 4 5 6 7 8 9
a b c d e f
A B C D E F
integer-suffix
unsigned-suffix long-suffixopt
unsigned-suffix long-long-suffix
long-suffix unsigned-suffixopt
long-long-suffix unsigned-suffixopt
unsigned-suffix
u U
long-suffix
l L
long-long-suffix
ll LL
floating-constant
decimal-floating-constant
hexadecimal-floating-constant
decimal-floating-constant
fractional-constant exponent-partopt floating-suffixopt
digit-sequence exponent-part floating-suffixopt
hexadecimal-floating-constant
hexadecimal-prefix hexadecimal-fractional-constant
binary-exponent-part floating-suffixopt
hexadecimal-prefix hexadecimal-digit-sequence
binary-exponent-part floating-suffixopt
fractional-constant
digit-sequenceopt . digit-sequence
digit-sequence .
exponent-part
e signopt digit-sequence
E signopt digit-sequence
sign
+ -
digit-sequence
digit
digit-sequence digit
hexadecimal-fractional-constant
hexadecimal-digit-sequenceopt . hexadecimal-digit-sequence
hexadecimal-digit-sequence .
binary-exponent-part
p signopt digit-sequence
P signopt digit-sequence
hexadecimal-digit-sequence
hexadecimal-digit
hexadecimal-digit-sequence hexadecimal-digit
floating-suffix
f l F L df dd dl DF DD DL
enumeration-constant
identifier
character-constant
encoding-prefixopt ' c-char-sequence '
encoding-prefix
u8
u
U
L
c-char-sequence
c-char
c-char-sequence c-char
c-char
any member of the source character set except
the single-quote ', backslash \, or new-line character
escape-sequence
escape-sequence
simple-escape-sequence
octal-escape-sequence
hexadecimal-escape-sequence
universal-character-name
simple-escape-sequence
\' \" \? \\
\a \b \f \n \r \t \v
octal-escape-sequence
\ octal-digit
\ octal-digit octal-digit
\ octal-digit octal-digit octal-digit
hexadecimal-escape-sequence
\x hexadecimal-digit
hexadecimal-escape-sequence hexadecimal-digit
string-literal
encoding-prefixopt " s-char-sequenceopt "
s-char-sequence
s-char
s-char-sequence s-char
s-char
any member of the source character set except
the double-quote ", backslash \, or new-line character
escape-sequence
punctuator
[ ] ( ) { } . ->
++ -- & * + - ~ !
/ % << >> < > <= >= == != ^ | && ||
? : :: ; ...
= *= /= %= += -= <<= >>= &= ^= |=
, # ##
<: :> <% %> %: %:%:
header-name
< h-char-sequence >
" q-char-sequence "
h-char-sequence
h-char
h-char-sequence h-char
h-char
any member of the source character set except
the new-line character and >
q-char-sequence
q-char
q-char-sequence q-char
q-char
any member of the source character set except
the new-line character and "
pp-number
digit
. digit
pp-number digit
pp-number identifier-nondigit
pp-number e sign
pp-number E sign
pp-number p sign
pp-number P sign
pp-number .
primary-expression
identifier
constant
string-literal
( expression )
generic-selection
generic-selection
_Generic ( assignment-expression , generic-assoc-list )
generic-assoc-list
generic-association
generic-assoc-list , generic-association
generic-association
type-name : assignment-expression
default : assignment-expression
postfix-expression
primary-expression
postfix-expression [ expression ]
postfix-expression ( argument-expression-listopt )
postfix-expression . identifier
postfix-expression -> identifier
postfix-expression ++
postfix-expression --
( type-name ) { initializer-list }
( type-name ) { initializer-list , }
argument-expression-list
assignment-expression
argument-expression-list , assignment-expression
unary-expression
postfix-expression
++ unary-expression
-- unary-expression
unary-operator cast-expression
sizeof unary-expression
sizeof ( type-name )
_Alignof ( type-name )
unary-operator
& * + - ~ !
cast-expression
unary-expression
( type-name ) cast-expression
multiplicative-expression
cast-expression
multiplicative-expression * cast-expression
multiplicative-expression / cast-expression
multiplicative-expression % cast-expression
additive-expression
multiplicative-expression
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression
shift-expression
additive-expression
shift-expression << additive-expression
shift-expression >> additive-expression
relational-expression
shift-expression
relational-expression < shift-expression
relational-expression > shift-expression
relational-expression <= shift-expression
relational-expression >= shift-expression
equality-expression
relational-expression
equality-expression == relational-expression
equality-expression != relational-expression
AND-expression
equality-expression
AND-expression & equality-expression
exclusive-OR-expression
AND-expression
exclusive-OR-expression ^ AND-expression
inclusive-OR-expression
exclusive-OR-expression
inclusive-OR-expression | exclusive-OR-expression
logical-AND-expression
inclusive-OR-expression
logical-AND-expression && inclusive-OR-expression
logical-OR-expression
logical-AND-expression
logical-OR-expression || logical-AND-expression
conditional-expression
logical-OR-expression
logical-OR-expression ? expression : conditional-expression
assignment-expression
conditional-expression
unary-expression assignment-operator assignment-expression
assignment-operator
= *= /= %= += -= <<= >>= &= ^= |=
expression
assignment-expression
expression , assignment-expression
constant-expression
conditional-expression
declaration
declaration-specifiers init-declarator-listopt ;
attribute-specifier-sequence declaration-specifiers init-declarator-list ;
static_assert-declaration attribute-declaration
declaration-specifiers
declaration-specifier attribute-specifier-sequenceopt
declaration-specifier declaration-specifiers
declaration-specifier
storage-class-specifier
type-specifier-qualifier
function-specifier
init-declarator-list
init-declarator
init-declarator-list , init-declarator
init-declarator
declarator
declarator = initializer
attribute-declaration
attribute-specifier-sequence ;
storage-class-specifier
typedef
extern
static
_Thread_local
auto
register
type-specifier
void
char
short
int
long
float
double
signed
unsigned
_Bool
_Complex
_Decimal32
_Decimal64
_Decimal128
atomic-type-specifier
struct-or-union-specifier
enum-specifier
typedef-name
struct-or-union-specifier
struct-or-union attribute-specifier-sequenceopt identifieropt { member-declaration-list }
struct-or-union attribute-specifier-sequenceopt identifier
struct-or-union
struct
union
member-declaration-list
member-declaration
member-declaration-list member-declaration
member-declaration
attribute-specifier-sequenceopt specifier-qualifier-list member-declarator-listopt ;
static_assert-declaration
specifier-qualifier-list
type-specifier-qualifier attribute-specifier-sequenceopt
type-specifier-qualifier specifier-qualifier-list
type-specifier-qualifier
type-specifier
type-qualifier
alignment-specifier
member-declarator-list
member-declarator
member-declarator-list , member-declarator
member-declarator
declarator
declaratoropt : constant-expression
enum-specifier
enum attribute-specifier-sequenceopt identifieropt { enumerator-list }
enum attribute-specifier-sequenceopt identifieropt { enumerator-list , }
enum identifier
enumerator-list
enumerator
enumerator-list , enumerator
enumerator
enumeration-constant attribute-specifier-sequenceopt
enumeration-constant attribute-specifier-sequenceopt = constant-expression
atomic-type-specifier
_Atomic ( type-name )
type-qualifier
const
restrict
volatile
_Atomic
function-specifier
inline
_Noreturn
alignment-specifier
_Alignas ( type-name )
_Alignas ( constant-expression )
declarator
pointeropt direct-declarator
direct-declarator
identifier attribute-specifier-sequenceopt
( declarator )
array-declarator attribute-specifier-sequenceopt
function-declarator attribute-specifier-sequenceopt
array-declarator
direct-declarator [ type-qualifier-listopt assignment-expressionopt ]
direct-declarator [ static type-qualifier-listopt assignment-expression ]
direct-declarator [ type-qualifier-list static assignment-expression ]
direct-declarator [ type-qualifier-listopt * ]
function-declarator
direct-declarator ( parameter-type-listopt )
pointer
* attribute-specifier-sequenceopt type-qualifier-listopt
* attribute-specifier-sequenceopt type-qualifier-listopt pointer
type-qualifier-list
type-qualifier
type-qualifier-list type-qualifier
parameter-type-list
parameter-list
parameter-list , ...
parameter-list
parameter-declaration
parameter-list , parameter-declaration
parameter-declaration
attribute-specifier-sequenceopt declaration-specifiers declarator
attribute-specifier-sequenceopt declaration-specifiers abstract-declaratoropt
type-name
specifier-qualifier-list abstract-declaratoropt
abstract-declarator
pointer
pointeropt direct-abstract-declarator
direct-abstract-declarator
( abstract-declarator )
array-abstract-declarator attribute-specifier-sequenceopt
function-abstract-declarator attribute-specifier-sequenceopt
array-abstract-declarator
direct-abstract-declaratoropt [ type-qualifier-listopt assignment-expressionopt ]
direct-abstract-declaratoropt [ static type-qualifier-listopt assignment-expression ]
direct-abstract-declaratoropt [ type-qualifier-list static assignment-expression ]
direct-abstract-declaratoropt [ * ]
function-abstract-declarator
direct-abstract-declaratoropt ( parameter-type-listopt )
typedef-name
identifier
initializer
assignment-expression
{ initializer-list }
{ initializer-list , }
initializer-list
designationopt initializer
initializer-list , designationopt initializer
designation
designator-list =
designator-list
designator
designator-list designator
designator
[ constant-expression ]
. identifier
static_assert-declaration
_Static_assert ( constant-expression , string-literal ) ;
_Static_assert ( constant-expression ) ;
attribute-specifier-sequence
attribute-specifier-sequenceopt attribute-specifier
attribute-specifier
[ [ attribute-list ] ]
attribute-list
attributeopt
attribute-list , attributeopt
attribute
attribute-token attribute-argument-clauseopt
attribute-token
standard-attribute
attribute-prefixed-token
standard-attribute
identifier
attribute-prefixed-token
attribute-prefix :: identifier
attribute-prefix
identifier
attribute-argument-clause
( balanced-token-sequenceopt )
balanced-token-sequence
balanced-token
balanced-token-sequence balanced-token
balanced-token
( balanced-token-sequenceopt )
[ balanced-token-sequenceopt ]
{ balanced-token-sequenceopt }
any token other than a parenthesis, a bracket, or a brace
statement
labeled-statement
unlabeled-statement
unlabeled-statement
expression-statement
attribute-specifier-sequenceopt compound-statement
attribute-specifier-sequenceopt selection-statement
attribute-specifier-sequenceopt iteration-statement
attribute-specifier-sequenceopt jump-statement
label
attribute-specifier-sequenceopt identifier :
attribute-specifier-sequenceopt case constant-expression :
attribute-specifier-sequenceopt default :
labeled-statement
label statement
compound-statement
{ block-item-listopt }
block-item-list
block-item
block-item-list block-item
block-item
declaration
unlabeled-statement
label
expression-statement
expressionopt ;
attribute-specifier-sequence expression ;
selection-statement
if ( expression ) statement
if ( expression ) statement else statement
switch ( expression ) statement
iteration-statement
while ( expression ) statement
do statement while ( expression ) ;
for ( expressionopt ; expressionopt ; expressionopt ) statement
for ( declaration expressionopt ; expressionopt ) statement
jump-statement
goto identifier ;
continue ;
break ;
return expressionopt ;
translation-unit
external-declaration
translation-unit external-declaration
external-declaration
function-definition
declaration
function-definition
attribute-specifier-sequenceopt declaration-specifiers declarator function-body
function-body
compound-statement
preprocessing-file
groupopt
group
group-part
group group-part
group-part
if-section
control-line
text-line
# non-directive
if-section
if-group elif-groupsopt else-groupopt endif-line
if-group
# if constant-expression new-line groupopt
# ifdef identifier new-line groupopt
# ifndef identifier new-line groupopt
elif-groups
elif-group
elif-groups elif-group
elif-group
# elif constant-expression new-line groupopt
else-group
# else new-line groupopt
endif-line
# endif new-line
control-line
# include pp-tokens new-line
# define identifier replacement-list new-line
# define identifier lparen identifier-listopt )
replacement-list new-line
# define identifier lparen ... ) replacement-list new-line
# define identifier lparen identifier-list , ... )
replacement-list new-line
# undef identifier new-line
# line pp-tokens new-line
# error pp-tokensopt new-line
# pragma pp-tokensopt new-line
# new-line
text-line
pp-tokensopt new-line
non-directive
pp-tokens new-line
lparen
a ( character not immediately preceded by white space
replacement-list
pp-tokensopt
pp-tokens
preprocessing-token
pp-tokens preprocessing-token
new-line
the new-line character
identifier-list
identifier
identifier-list , identifier
standard-pragma
# pragma STDC FP_CONTRACT on-off-switch
# pragma STDC FENV_ACCESS on-off-switch
# pragma STDC FENV_DEC_ROUND dec-direction
# pragma STDC FENV_ROUND direction
# pragma STDC CX_LIMITED_RANGE on-off-switch
on-off-switch
ON OFF DEFAULT
direction
FE_DOWNWARD FE_TONEAREST FE_TONEARESTFROMZERO
FE_TOWARDZERO FE_UPWARD FE_DYNAMIC
dec-direction
FE_DEC_DOWNWARD FE_DEC_TONEAREST FE_DEC_TONEARESTFROMZERO
FE_DEC_TOWARDZERO FE_DEC_UPWARD FE_DEC_DYNAMIC
n-char-sequence
digit
nondigit
n-char-sequence digit
n-char-sequence nondigit
n-wchar-sequence
digit
nondigit
n-wchar-sequence digit
n-wchar-sequence nondigit
d-char-sequence
digit
nondigit
d-char-sequence digit
d-char-sequence nondigit
d-wchar-sequence
digit
nondigit
d-wchar-sequence digit
d-wchar-sequence nondigit