Skip to content

Commit fc6f2c3

Browse files
committed
[lex.operators] Dissolve bnfkeytab; use simple spaces for alignment.
1 parent 6b700d6 commit fc6f2c3

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

source/lex.tex

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -792,18 +792,20 @@
792792
preprocessing tokens which are used in the syntax of the preprocessor or
793793
are converted into tokens for operators and punctuators:
794794

795-
\begin{bnfkeywordtab}
795+
\begin{bnf}
796+
%% Ed. note: character protrusion would misalign various operators.
797+
\microtypesetup{protrusion=false}\obeyspaces
796798
\nontermdef{preprocessing-op-or-punc} \textnormal{one of}\br
797-
\>\{ \>\} \>[ \>] \>\# \>\#\# \>( \>)\br
798-
\><: \>:> \><\% \>\%> \>\%: \>\%:\%: \>; \>: \>.{..}\br
799-
\>new \>delete \>? \>:: \>. \>.* \>-> \>->* \>\~\br
800-
\>! \>+ \>- \>* \>/ \>\% \>\caret \>\& \>|\br
801-
\>= \>+= \>-= \>*= \>/= \>\%= \>\caret= \>\&= \>|=\br
802-
\>== \>!= \>< \>> \><= \>>= \><=> \>\&\& \>||\br
803-
\><< \>>> \><<= \>>>= \>++ \>-{-} \>,\br
804-
\>and \>or \>xor \>not \>bitand \>bitor \>compl\br
805-
\>and_eq \>or_eq \>xor_eq \>not_eq
806-
\end{bnfkeywordtab}
799+
\terminal{\{ \} [ ] \# \#\# ( )}\br
800+
\terminal{<: :> <\% \%> \%: \%:\%: ; : ...}\br
801+
\terminal{new delete ? :: . .* -> ->* \~}\br
802+
\terminal{! + - * / \% \caret{} \& |}\br
803+
\terminal{= += -= *= /= \%= \caret{}= \&= |=}\br
804+
\terminal{== != < > <= >= <=> \&\& ||}\br
805+
\terminal{<< >> <<= >>= ++ -- ,}\br
806+
\terminal{and or xor not bitand bitor compl}\br
807+
\terminal{and_eq or_eq xor_eq not_eq}
808+
\end{bnf}
807809

808810
Each \grammarterm{preprocessing-op-or-punc} is converted to a single token
809811
in translation phase 7\iref{lex.phases}.%

0 commit comments

Comments
 (0)