Skip to content

Commit 24900a4

Browse files
committed
[cpp] Swap "control-line" and "if-section".
With the increased vertical grammar spacing, it is expedient to put the presentation of "control-line" onto the first page so as not to require a huge gap.
1 parent 1fa9b38 commit 24900a4

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

source/preprocessor.tex

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,26 @@
4141

4242
\begin{bnf}
4343
\nontermdef{group-part}\br
44-
if-section\br
4544
control-line\br
45+
if-section\br
4646
text-line\br
4747
\terminal{\#} conditionally-supported-directive
4848
\end{bnf}
4949

50+
\begin{bnftab}
51+
\nontermdef{control-line}\br
52+
\>\terminal{\# include}\>\>pp-tokens new-line\br
53+
\>\terminal{\# define}\>\>identifier replacement-list new-line\br
54+
\>\terminal{\# define}\>\>identifier lparen identifier-list\opt{} \terminal{)} replacement-list new-line\br
55+
\>\terminal{\# define}\>\>identifier lparen \terminal{... )} replacement-list new-line\br
56+
\>\terminal{\# define}\>\>identifier lparen identifier-list, \terminal{... )} replacement-list new-line\br
57+
\>\terminal{\# undef}\>\>identifier new-line\br
58+
\>\terminal{\# line}\>\>pp-tokens new-line\br
59+
\>\terminal{\# error}\>\>pp-tokens\opt new-line\br
60+
\>\terminal{\# pragma}\>\>pp-tokens\opt new-line\br
61+
\>\terminal{\# }new-line
62+
\end{bnftab}
63+
5064
\begin{bnf}
5165
\nontermdef{if-section}\br
5266
if-group elif-groups\opt else-group\opt endif-line
@@ -80,20 +94,6 @@
8094
\>\terminal{\# endif}\>\>new-line
8195
\end{bnftab}
8296

83-
\begin{bnftab}
84-
\nontermdef{control-line}\br
85-
\>\terminal{\# include}\>\>pp-tokens new-line\br
86-
\>\terminal{\# define}\>\>identifier replacement-list new-line\br
87-
\>\terminal{\# define}\>\>identifier lparen identifier-list\opt{} \terminal{)} replacement-list new-line\br
88-
\>\terminal{\# define}\>\>identifier lparen \terminal{... )} replacement-list new-line\br
89-
\>\terminal{\# define}\>\>identifier lparen identifier-list, \terminal{... )} replacement-list new-line\br
90-
\>\terminal{\# undef}\>\>identifier new-line\br
91-
\>\terminal{\# line}\>\>pp-tokens new-line\br
92-
\>\terminal{\# error}\>\>pp-tokens\opt new-line\br
93-
\>\terminal{\# pragma}\>\>pp-tokens\opt new-line\br
94-
\>\terminal{\# }new-line
95-
\end{bnftab}
96-
9797
\begin{bnf}
9898
\nontermdef{text-line}\br
9999
pp-tokens\opt new-line

0 commit comments

Comments
 (0)