Skip to content

Commit

Permalink
#14 regex first
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jul 11, 2023
1 parent e977747 commit bcae984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions naive-ebnf.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@
\regex_replace_all:nnN { ([^\ ])'([^\ ]) } {\1\\textquotesingle{}\2} \ebnf_tmp%
\regex_replace_all:nnN { ([^\ ])\|([^\ ]) } {\1\\textbar{}\2} \ebnf_tmp%
%
\regex_replace_all:nnN { /(.+?)/ }%
{\c{ebnf@regexp}{\1}} \ebnf_tmp%
\cs_new:Npn\ebnf_curled{\regex_replace_all:nnNT { \{\ ([^\}\{]+?)\ \} }%
{\c{ebnf@repetition}{\1}} \ebnf_tmp \ebnf_curled}%
\ebnf_curled%
Expand All @@ -411,8 +413,6 @@
{\c{ebnf@terminal}{\1}} \ebnf_tmp%
\regex_replace_all:nnN { '(.+?)' }%
{\c{ebnf@special}{\1}} \ebnf_tmp%
\regex_replace_all:nnN { /(.+?)/ }%
{\c{ebnf@regexp}{\1}} \ebnf_tmp%
\regex_replace_all:nnN { \|(\|) }%
{\c{makebox}[#1][r]{ \1 }} \ebnf_tmp%
\regex_replace_all:nnN { \| }%
Expand Down

0 comments on commit bcae984

Please sign in to comment.