texlive[67621] Master/texmf-dist: naive-ebnf (13jul23)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 13 21:56:40 CEST 2023


Revision: 67621
          http://tug.org/svn/texlive?view=revision&revision=67621
Author:   karl
Date:     2023-07-13 21:56:40 +0200 (Thu, 13 Jul 2023)
Log Message:
-----------
naive-ebnf (13jul23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/naive-ebnf/naive-ebnf.pdf
    trunk/Master/texmf-dist/source/latex/naive-ebnf/naive-ebnf.dtx
    trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty

Modified: trunk/Master/texmf-dist/doc/latex/naive-ebnf/naive-ebnf.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/naive-ebnf/naive-ebnf.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/naive-ebnf/naive-ebnf.dtx	2023-07-13 19:56:28 UTC (rev 67620)
+++ trunk/Master/texmf-dist/source/latex/naive-ebnf/naive-ebnf.dtx	2023-07-13 19:56:40 UTC (rev 67621)
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{naive-ebnf}
 %<*package>
-[2023-07-12 0.0.11 EBNF in Plain Text]
+[2023-07-13 0.0.12 EBNF in Plain Text]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -192,7 +192,7 @@
 % \usepackage[paperwidth=4in]{geometry}
 % \usepackage{naive-ebnf}
 % \begin{document}
-% \begin{ebnf}[1.5in]
+% \begin{ebnf}
 % <data> := <bool> | <integer> | <byte> \\
 % <bool> := "TRUE" | "FALSE" \\
 % <integer> := /(+\char`\|-)?[0-9]+/ \\
@@ -208,7 +208,7 @@
 % \usepackage[T1]{fontenc}
 % \usepackage{naive-ebnf}
 % \begin{document}
-% \begin{ebnf}[1.5in]
+% \begin{ebnf}
 % <X> := 'EOL' "'" "|" \\
 % <Y> := ">" "<" "[" "]" "/" "/" \\
 % <Z> := "\LaTeX" "\textdollar" \\
@@ -217,13 +217,14 @@
 % \end{docshot}
 
 % Nested brackets work fine too:
-% \docshotOptions{firstline=5,lastline=10}
+% \docshotOptions{firstline=5,lastline=11}
 % \begin{docshot}
 % \documentclass{minimal}
 % \usepackage[T1]{fontenc}
 % \usepackage{naive-ebnf}
 % \begin{document}
-% \begin{ebnf}[1.5in]
+% \begin{ebnf}
+% % There is no meaning in this:
 % <x> := ( "x" ( "y" | ( "z" | <z> ) ) ) \\
 % <y> := [ [ "x1" ] { /[a-z]+/ } ] \\
 % <z> := { { { <x> } <y> } <z> } \\
@@ -395,34 +396,34 @@
   {\tl_set:Nn\ebnf_tmp{#2}}
   {%
   \regex_replace_all:nnN
-    { ([^\ ])/([^\ ]) } {\1\\slash{}\2} \ebnf_tmp%
+    { ([^\s])/([^\s]) } {\1\\slash{}\2} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])< } {\1\\textless{}} \ebnf_tmp%
+    { ([^\s])< } {\1\\textless{}} \ebnf_tmp%
   \regex_replace_all:nnN
-    { >([^\ ]) } {\\textgreater{}\1} \ebnf_tmp%
+    { >([^\s]) } {\\textgreater{}\1} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])'([^\ ]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
+    { ([^\s])'([^\s]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])\|([^\ ]) } {\1\\textbar{}\2} \ebnf_tmp%
+    { ([^\s])\|([^\s]) } {\1\\textbar{}\2} \ebnf_tmp%
   %
-  \regex_replace_all:nnN { \ /(.+?)/\  }%
+  \regex_replace_all:nnN { \s/(.+?)/\s }%
     {\c{ebnf at regexp}{\1}} \ebnf_tmp%
   \cs_new:Npn\ebnf_curled{%
     \regex_replace_all:nnNT
-    { \{\ (([^\ ]*(\ [^\}\{]|\ (\}|\{)[^\ ])?)*)\ \} }%
+    { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\} }%
     {\c{ebnf at repetition}{\1}} \ebnf_tmp \ebnf_curled}%
   \ebnf_curled%
   \cs_new:Npn\ebnf_brackets{%
     \regex_replace_all:nnNT
-    { \(\ (([^\ ]*(\ [^\)\(]|\ (\)|\()[^\ ])?)*)\ \) }%
+    { \(\s(([^\s]*(\s[^\)\(]|\s(\)|\()[^\s])?)*)\s\) }%
     {\c{ebnf at grouping}{\1}} \ebnf_tmp \ebnf_brackets}%
   \ebnf_brackets%
   \cs_new:Npn\ebnf_squares{%
     \regex_replace_all:nnNT
-    { \[\ (([^\ ]*(\ [^\]\[]|\ (\]|\[)[^\ ])?)*)\ \] }%
+    { \[\s(([^\s]*(\s[^\]\[]|\s(\]|\[)[^\s])?)*)\s\] }%
     {\c{ebnf at optional}{\1}} \ebnf_tmp \ebnf_squares}%
   \ebnf_squares%
-  \regex_replace_all:nnN { (<[^>]+?>\ :=) }%
+  \regex_replace_all:nnN { (<[^>]+?>\s:=) }%
     {\c{makebox}[#1][r]{\1}} \ebnf_tmp%
   \regex_replace_all:nnN { <(.+?)> }%
     {\c{ebnf at nonterminal}{\1}} \ebnf_tmp%

Modified: trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty	2023-07-13 19:56:28 UTC (rev 67620)
+++ trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty	2023-07-13 19:56:40 UTC (rev 67621)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{naive-ebnf}
-[2023-07-12 0.0.11 EBNF in Plain Text]
+[2023-07-13 0.0.12 EBNF in Plain Text]
 
 
 
@@ -131,34 +131,34 @@
   {\tl_set:Nn\ebnf_tmp{#2}}
   {%
   \regex_replace_all:nnN
-    { ([^\ ])/([^\ ]) } {\1\\slash{}\2} \ebnf_tmp%
+    { ([^\s])/([^\s]) } {\1\\slash{}\2} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])< } {\1\\textless{}} \ebnf_tmp%
+    { ([^\s])< } {\1\\textless{}} \ebnf_tmp%
   \regex_replace_all:nnN
-    { >([^\ ]) } {\\textgreater{}\1} \ebnf_tmp%
+    { >([^\s]) } {\\textgreater{}\1} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])'([^\ ]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
+    { ([^\s])'([^\s]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
   \regex_replace_all:nnN
-    { ([^\ ])\|([^\ ]) } {\1\\textbar{}\2} \ebnf_tmp%
+    { ([^\s])\|([^\s]) } {\1\\textbar{}\2} \ebnf_tmp%
   %
-  \regex_replace_all:nnN { \ /(.+?)/\  }%
+  \regex_replace_all:nnN { \s/(.+?)/\s }%
     {\c{ebnf at regexp}{\1}} \ebnf_tmp%
   \cs_new:Npn\ebnf_curled{%
     \regex_replace_all:nnNT
-    { \{\ (([^\ ]*(\ [^\}\{]|\ (\}|\{)[^\ ])?)*)\ \} }%
+    { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\} }%
     {\c{ebnf at repetition}{\1}} \ebnf_tmp \ebnf_curled}%
   \ebnf_curled%
   \cs_new:Npn\ebnf_brackets{%
     \regex_replace_all:nnNT
-    { \(\ (([^\ ]*(\ [^\)\(]|\ (\)|\()[^\ ])?)*)\ \) }%
+    { \(\s(([^\s]*(\s[^\)\(]|\s(\)|\()[^\s])?)*)\s\) }%
     {\c{ebnf at grouping}{\1}} \ebnf_tmp \ebnf_brackets}%
   \ebnf_brackets%
   \cs_new:Npn\ebnf_squares{%
     \regex_replace_all:nnNT
-    { \[\ (([^\ ]*(\ [^\]\[]|\ (\]|\[)[^\ ])?)*)\ \] }%
+    { \[\s(([^\s]*(\s[^\]\[]|\s(\]|\[)[^\s])?)*)\s\] }%
     {\c{ebnf at optional}{\1}} \ebnf_tmp \ebnf_squares}%
   \ebnf_squares%
-  \regex_replace_all:nnN { (<[^>]+?>\ :=) }%
+  \regex_replace_all:nnN { (<[^>]+?>\s:=) }%
     {\c{makebox}[#1][r]{\1}} \ebnf_tmp%
   \regex_replace_all:nnN { <(.+?)> }%
     {\c{ebnf at nonterminal}{\1}} \ebnf_tmp%



More information about the tex-live-commits mailing list.