texlive[67851] Master/texmf-dist: naive-ebnf (8aug23)

commits+karl at tug.org commits+karl at tug.org
Tue Aug 8 21:53:29 CEST 2023


Revision: 67851
          http://tug.org/svn/texlive?view=revision&revision=67851
Author:   karl
Date:     2023-08-08 21:53:29 +0200 (Tue, 08 Aug 2023)
Log Message:
-----------
naive-ebnf (8aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/naive-ebnf/DEPENDS.txt
    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/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/naive-ebnf/DEPENDS.txt	2023-08-08 19:53:20 UTC (rev 67850)
+++ trunk/Master/texmf-dist/doc/latex/naive-ebnf/DEPENDS.txt	2023-08-08 19:53:29 UTC (rev 67851)
@@ -1,2 +1,15 @@
 hard pgfopts
-hard expl3
\ No newline at end of file
+soft docshots
+soft etoolbox
+soft filecontentsdef
+soft href-ul
+soft hypdoc
+soft iexec
+soft l3build
+soft libertine
+soft mathtools
+soft microtype
+soft newtx
+soft pgfopts
+soft scheme-basic
+soft xetex
\ No newline at end of file

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-08-08 19:53:20 UTC (rev 67850)
+++ trunk/Master/texmf-dist/source/latex/naive-ebnf/naive-ebnf.dtx	2023-08-08 19:53:29 UTC (rev 67851)
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{naive-ebnf}
 %<*package>
-[2023-07-14 0.0.13 EBNF in Plain Text]
+[2023-08-08 0.0.14 EBNF in Plain Text]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -112,6 +112,7 @@
 % \item |/.../| denotes a regular expression, like |/[a-z]+/|;
 % \item |[...]| denotes an optional substitution;
 % \item |{...}| denotes a zero or more times repetition;
+% \item |{...}+| denotes one or more times repetition;
 % \item \texttt{\char`\|\char`\|} denotes an indented vertical bar at the beginning of the string.
 % \end{itemize}
 
@@ -228,7 +229,7 @@
 % % There is no meaning in this:
 % <x> := ( "x" ( "y" | ( "z" | <z> ) ) ) \\
 % <y> := [ [ "x1" ] { /[a-z]+/ } ] \\
-% <z> := { { { <x> } <y> } <z> } \\
+% <z> := { { { <x> }+ <y> } <z> } \\
 % <t> := [ <x> ] [ <y> ] \\
 % \end{ebnf}
 % \end{document}
@@ -354,6 +355,8 @@
   {\ebnf at color{gray}{[}#1\ebnf at color{gray}{]}}
 \newcommand\ebnf at repetition[1]
   {\ebnf at color{gray}{\{}#1\ebnf at color{gray}{\}}}
+\newcommand\ebnf at iteration[1]
+  {\ebnf at color{gray}{\{}#1\ebnf at color{gray}{\}\(^{\scriptscriptstyle +}\)}}
 \newcommand\ebnf at grouping[1]
   {\ebnf at color{gray}{(}#1\ebnf at color{gray}{)}}
 \ExplSyntaxOn
@@ -388,6 +391,7 @@
 % \begin{macro}{ebnf}
 % \changes{0.0.4}{2023/02/03}{Any symbols are allowed inside \texttt{\char`\\EbnfNonTerminal} commands and inside the \texttt{ebnf} environment, where non-terminals are mentioned.}
 % \changes{0.0.11}{2023/07/12}{Many bugs fixed in the area of regular expression matching.}
+% \changes{0.0.14}{2023/08/08}{One-or-more repetition introduced with \texttt{\char`\{...\char`\}+} syntax.}
 % Then, we define the |ebnf| environment:
 %    \begin{macrocode}
 \ExplSyntaxOn
@@ -410,6 +414,11 @@
   \regex_replace_all:nnN
     { /(.+?)/ }%
     {\c{ebnf at regexp}{\1}} \ebnf_tmp%
+  \cs_new:Npn\ebnf_iterated{%
+    \regex_replace_all:nnNT
+    { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\}\+ }%
+    {\c{ebnf at iteration}{\1}} \ebnf_tmp \ebnf_iterated}%
+  \ebnf_iterated%
   \cs_new:Npn\ebnf_curled{%
     \regex_replace_all:nnNT
     { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\} }%

Modified: trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty	2023-08-08 19:53:20 UTC (rev 67850)
+++ trunk/Master/texmf-dist/tex/latex/naive-ebnf/naive-ebnf.sty	2023-08-08 19:53:29 UTC (rev 67851)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{naive-ebnf}
-[2023-07-14 0.0.13 EBNF in Plain Text]
+[2023-08-08 0.0.14 EBNF in Plain Text]
 
 
 
@@ -94,6 +94,8 @@
   {\ebnf at color{gray}{[}#1\ebnf at color{gray}{]}}
 \newcommand\ebnf at repetition[1]
   {\ebnf at color{gray}{\{}#1\ebnf at color{gray}{\}}}
+\newcommand\ebnf at iteration[1]
+  {\ebnf at color{gray}{\{}#1\ebnf at color{gray}{\}\(^{\scriptscriptstyle +}\)}}
 \newcommand\ebnf at grouping[1]
   {\ebnf at color{gray}{(}#1\ebnf at color{gray}{)}}
 \ExplSyntaxOn
@@ -144,6 +146,11 @@
   \regex_replace_all:nnN
     { /(.+?)/ }%
     {\c{ebnf at regexp}{\1}} \ebnf_tmp%
+  \cs_new:Npn\ebnf_iterated{%
+    \regex_replace_all:nnNT
+    { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\}\+ }%
+    {\c{ebnf at iteration}{\1}} \ebnf_tmp \ebnf_iterated}%
+  \ebnf_iterated%
   \cs_new:Npn\ebnf_curled{%
     \regex_replace_all:nnNT
     { \{\s(([^\s]*(\s[^\}\{]|\s(\}|\{)[^\s])?)*)\s\} }%



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