Annex A (informative)
Grammar summary
[gram]
A.13
Preprocessing directives
[gram.cpp]
preprocessing-file
:
group
o
p
t
module-file
module-file
:
pp-global-module-fragment
o
p
t
pp-module
group
o
p
t
pp-private-module-fragment
o
p
t
pp-global-module-fragment
:
module
;
new-line
group
o
p
t
pp-private-module-fragment
:
module
:
private
;
new-line
group
o
p
t
group
:
group-part
group
group-part
group-part
:
control-line
if-section
text-line
#
conditionally-supported-directive
control-line
:
# include
pp-tokens
new-line
pp-import
# define
identifier
replacement-list
new-line
# define
identifier
lparen
identifier-list
o
p
t
)
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-tokens
o
p
t
new-line
# warning
pp-tokens
o
p
t
new-line
# pragma
pp-tokens
o
p
t
new-line
#
new-line
if-section
:
if-group
elif-groups
o
p
t
else-group
o
p
t
endif-line
if-group
:
# if
constant-expression
new-line
group
o
p
t
# ifdef
identifier
new-line
group
o
p
t
# ifndef
identifier
new-line
group
o
p
t
elif-groups
:
elif-group
elif-groups
elif-group
elif-group
:
# elif
constant-expression
new-line
group
o
p
t
# elifdef
identifier
new-line
group
o
p
t
# elifndef
identifier
new-line
group
o
p
t
else-group
:
# else
new-line
group
o
p
t
endif-line
:
# endif
new-line
text-line
:
pp-tokens
o
p
t
new-line
conditionally-supported-directive
:
pp-tokens
new-line
lparen
:
a
(
character not immediately preceded by whitespace
identifier-list
:
identifier
identifier-list
,
identifier
replacement-list
:
pp-tokens
o
p
t
pp-tokens
:
preprocessing-token
pp-tokens
preprocessing-token
new-line
:
the new-line character
defined-macro-expression
:
defined
identifier
defined
(
identifier
)
h-preprocessing-token
:
any
preprocessing-token
other than
>
h-pp-tokens
:
h-preprocessing-token
h-pp-tokens
h-preprocessing-token
header-name-tokens
:
string-literal
<
h-pp-tokens
>
has-include-expression
:
__has_
include
(
header-name
)
__has_
include
(
header-name-tokens
)
has-attribute-expression
:
__has_
cpp_
attribute
(
pp-tokens
)
pp-module
:
export
o
p
t
module
pp-tokens
o
p
t
;
new-line
pp-import
:
export
o
p
t
import
header-name
pp-tokens
o
p
t
;
new-line
export
o
p
t
import
header-name-tokens
pp-tokens
o
p
t
;
new-line
export
o
p
t
import
pp-tokens
;
new-line
va-opt-replacement
:
__VA_
OPT__
(
pp-tokens
o
p
t
)