Annex A (informative) Grammar summary [gram]

A.12 Preprocessing directives [gram.cpp]

preprocessing-file:
	group
group:
	group-part
	group group-part
group-part:
	control-line
	if-section
	text-line
	# conditionally-supported-directive
control-line:
	# include pp-tokens new-line
	# define  identifier replacement-list new-line
	# define  identifier lparen identifier-list ) 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 new-line
	# pragma  pp-tokens new-line
	# new-line
if-section:
	if-group elif-groups else-group endif-line
if-group:
	# if      constant-expression new-line group
	# ifdef   identifier new-line group
	# ifndef  identifier new-line group
elif-groups:
	elif-group
	elif-groups elif-group
elif-group:
	# elif    constant-expression new-line group
else-group:
	# else    new-line group
endif-line:
	# endif   new-line
text-line:
	pp-tokens new-line
conditionally-supported-directive:
	pp-tokens new-line
lparen:
	a ( character not immediately preceded by white-space
identifier-list:
	identifier
	identifier-list , identifier
replacement-list:
	pp-tokens
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-global-module-fragment:
	module ; pp-balanced-token-seq module
import-seq:
	top-level-token-seq export import
top-level-token-seq:
	any pp-balanced-token-seq ending in ; or }
pp-import:
	import header-name pp-import-suffix ;
	import header-name-tokens pp-import-suffix ;
pp-import-suffix:
	pp-import-suffix-token
	pp-import-suffix pp-import-suffix-token
pp-import-suffix-token:
	any pp-balanced-token other than ;
pp-balanced-token-seq:
	pp-balanced-token
	pp-balanced-token-seq pp-balanced-token
pp-balanced-token:
	pp-ldelim pp-balanced-token-seq pp-rdelim
	any preprocessing-token other than a pp-ldelim or pp-rdelim
pp-ldelim: one of
	(    [    {    <:    <%
pp-rdelim: one of
	)    ]    }    :>    %>
va-opt-replacement:
	__VA_­OPT__ ( pp-tokens )