From 38d617895ff763da86d063bc7f3db647f800e01b Mon Sep 17 00:00:00 2001 From: lprv <100177227+lprv@users.noreply.github.com> Date: Mon, 8 Dec 2025 17:15:08 +0000 Subject: [PATCH] [lex] Move definitions, and remove redundant use, of "[non]digit" --- source/lex.tex | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/source/lex.tex b/source/lex.tex index 8005b33374..bc4d0ab1bb 100644 --- a/source/lex.tex +++ b/source/lex.tex @@ -759,6 +759,19 @@ pp-number \terminal{.} \end{bnf} +\begin{bnf} +\nontermdef{nondigit} \textnormal{one of}\br + \terminal{a b c d e f g h i j k l m}\br + \terminal{n o p q r s t u v w x y z}\br + \terminal{A B C D E F G H I J K L M}\br + \terminal{N O P Q R S T U V W X Y Z _} +\end{bnf} + +\begin{bnf} +\nontermdef{digit} \textnormal{one of}\br + \terminal{0 1 2 3 4 5 6 7 8 9} +\end{bnf} + \pnum Preprocessing number tokens lexically include all \grammarterm{integer-literal} tokens\iref{lex.icon} and @@ -903,30 +916,15 @@ \begin{bnf} \nontermdef{identifier-start}\br - nondigit\br + \terminal{_}\br \textnormal{an element of the translation character set with the Unicode property XID_Start} \end{bnf} \begin{bnf} \nontermdef{identifier-continue}\br - digit\br - nondigit\br \textnormal{an element of the translation character set with the Unicode property XID_Continue} \end{bnf} -\begin{bnf} -\nontermdef{nondigit} \textnormal{one of}\br - \terminal{a b c d e f g h i j k l m}\br - \terminal{n o p q r s t u v w x y z}\br - \terminal{A B C D E F G H I J K L M}\br - \terminal{N O P Q R S T U V W X Y Z _} -\end{bnf} - -\begin{bnf} -\nontermdef{digit} \textnormal{one of}\br - \terminal{0 1 2 3 4 5 6 7 8 9} -\end{bnf} - \pnum \indextext{name!length of}% \indextext{name}%