Skip to content

Commit fb1efad

Browse files
(alx-0014r6-F) Refactor syntax of diagnostic directives
Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 61fd02e commit fb1efad

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

source/preprocessor.tex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
define-directive\br
5454
undef-directive\br
5555
line-directive\br
56-
\terminal{\# error \ } \opt{pp-tokens} new-line\br
57-
\terminal{\# warning} \opt{pp-tokens} new-line\br
56+
diagnostic-directive\br
5857
\terminal{\# pragma } \opt{pp-tokens} new-line\br
5958
\terminal{\# }new-line
6059
\end{bnf}
@@ -2155,6 +2154,12 @@
21552154
\indextext{preprocessing directive!warning}%
21562155
\indextext{\idxcode{\#error}|see{preprocessing directive, error}}
21572156

2157+
\begin{bnf}
2158+
\nontermdef{diagnostic-directive}\br
2159+
\terminal{\# error \ } \opt{pp-tokens} new-line\br
2160+
\terminal{\# warning} \opt{pp-tokens} new-line\br
2161+
\end{bnf}
2162+
21582163
\pnum
21592164
A preprocessing directive of the form
21602165
\begin{ncsimplebnf}

0 commit comments

Comments
 (0)