Skip to content

Commit 38d6178

Browse files
committed
[lex] Move definitions, and remove redundant use, of "[non]digit"
1 parent 940a063 commit 38d6178

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

source/lex.tex

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,19 @@
759759
pp-number \terminal{.}
760760
\end{bnf}
761761

762+
\begin{bnf}
763+
\nontermdef{nondigit} \textnormal{one of}\br
764+
\terminal{a b c d e f g h i j k l m}\br
765+
\terminal{n o p q r s t u v w x y z}\br
766+
\terminal{A B C D E F G H I J K L M}\br
767+
\terminal{N O P Q R S T U V W X Y Z _}
768+
\end{bnf}
769+
770+
\begin{bnf}
771+
\nontermdef{digit} \textnormal{one of}\br
772+
\terminal{0 1 2 3 4 5 6 7 8 9}
773+
\end{bnf}
774+
762775
\pnum
763776
Preprocessing number tokens lexically include
764777
all \grammarterm{integer-literal} tokens\iref{lex.icon} and
@@ -903,30 +916,15 @@
903916

904917
\begin{bnf}
905918
\nontermdef{identifier-start}\br
906-
nondigit\br
919+
\terminal{_}\br
907920
\textnormal{an element of the translation character set with the Unicode property XID_Start}
908921
\end{bnf}
909922

910923
\begin{bnf}
911924
\nontermdef{identifier-continue}\br
912-
digit\br
913-
nondigit\br
914925
\textnormal{an element of the translation character set with the Unicode property XID_Continue}
915926
\end{bnf}
916927

917-
\begin{bnf}
918-
\nontermdef{nondigit} \textnormal{one of}\br
919-
\terminal{a b c d e f g h i j k l m}\br
920-
\terminal{n o p q r s t u v w x y z}\br
921-
\terminal{A B C D E F G H I J K L M}\br
922-
\terminal{N O P Q R S T U V W X Y Z _}
923-
\end{bnf}
924-
925-
\begin{bnf}
926-
\nontermdef{digit} \textnormal{one of}\br
927-
\terminal{0 1 2 3 4 5 6 7 8 9}
928-
\end{bnf}
929-
930928
\pnum
931929
\indextext{name!length of}%
932930
\indextext{name}%

0 commit comments

Comments
 (0)