diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintexpr.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty index 2abe4875295..ee73aaaf58f 100644 --- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty +++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty @@ -22,7 +22,7 @@ %% in the same archive or directory.) %% %%---------------------------------------------------------------- -%% The xint bundle (version 1.09e of October 29, 2013) +%% The xint bundle (version 1.09f of November 4, 2013) %% xintexpr: Expandable expression parser %% Copyright (C) 2013 by Jean-Francois Burnol %%---------------------------------------------------------------- @@ -105,7 +105,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2013/10/29 v1.09e Expandable expression parser (jfB)]% + [2013/11/04 v1.09f Expandable expression parser (jfB)]% \def\xint_gob_til_dot #1.{}% \def\xint_gob_til_dot_andstop #1.{ }% \def\xint_gob_til_! #1!{}% nota bene: ! is of catcode 11 @@ -329,7 +329,7 @@ \expandafter\XINT_expr_getop \fi }% -\def\xint_tmp_do_defs #1#2#3#4#5% +\def\XINT_tmpa #1#2#3#4#5% {% \def#1##1% {% @@ -351,20 +351,20 @@ \fi }% }% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_expr_until_end_a\expandafter\endcsname \csname XINT_expr_until_end_b\expandafter\endcsname \csname XINT_expr_op_-vi\expandafter\endcsname \csname XINT_expr_done\endcsname {expr}% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_flexpr_until_end_a\expandafter\endcsname \csname XINT_flexpr_until_end_b\expandafter\endcsname \csname XINT_flexpr_op_-vi\expandafter\endcsname \csname XINT_flexpr_done\endcsname {flexpr}% \def\XINT_expr_extra_closing_paren {\xintError:removed }% -\def\xint_tmp_do_defs #1#2#3#4#5#6% +\def\XINT_tmpa #1#2#3#4#5#6% {% \def #1{\expandafter #3\romannumeral-`0\XINT_expr_getnext }% \let #2#1% @@ -381,14 +381,14 @@ \fi }% }% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_expr_op_(\expandafter\endcsname \csname XINT_expr_oparen\expandafter\endcsname \csname XINT_expr_until_)_a\expandafter\endcsname \csname XINT_expr_until_)_b\expandafter\endcsname \csname XINT_expr_op_-vi\endcsname {expr}% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_flexpr_op_(\expandafter\endcsname \csname XINT_flexpr_oparen\expandafter\endcsname \csname XINT_flexpr_until_)_a\expandafter\endcsname @@ -400,9 +400,9 @@ \expandafter\let\csname XINT_expr_op_)\endcsname\XINT_expr_getop \expandafter\let\csname XINT_flexpr_precedence_)\endcsname \xint_c_i \expandafter\let\csname XINT_flexpr_op_)\endcsname\XINT_expr_getop -\def\xint_tmp_def #1#2#3#4#5#6% +\def\XINT_tmpb #1#2#3#4#5#6% {% - \expandafter\xint_tmp_do_defs + \expandafter\XINT_tmpc \csname XINT_#1_op_#3\expandafter\endcsname \csname XINT_#1_until_#3_a\expandafter\endcsname \csname XINT_#1_until_#3_b\expandafter\endcsname @@ -411,7 +411,7 @@ \csname #2#6\expandafter\endcsname \csname XINT_expr_precedence_#3\endcsname {#1}% }% -\def\xint_tmp_do_defs #1#2#3#4#5#6#7#8% +\def\XINT_tmpc #1#2#3#4#5#6#7#8% {% \def #1##1% \XINT_expr_op_<op> {% keep value, get next number and operator, then do until @@ -436,8 +436,8 @@ }% \let #7#5% }% -\def\xint_tmp_def_a #1{\xint_tmp_def {expr}{xint}#1}% -\xintApplyInline {\xint_tmp_def_a }{% +\def\XINT_tmpa #1{\XINT_tmpb {expr}{xint}#1}% +\xintApplyInline {\XINT_tmpa }{% {|{iii}{vi}{OR}}% {&{iv}{vi}{AND}}% {<{v}{vi}{Lt}}% @@ -451,16 +451,16 @@ {e{ix}{ix}{fE}}% {E{ix}{ix}{fE}}% }% -\def\xint_tmp_def_a #1{\xint_tmp_def {flexpr}{xint}#1}% -\xintApplyInline {\xint_tmp_def_a }{% +\def\XINT_tmpa #1{\XINT_tmpb {flexpr}{xint}#1}% +\xintApplyInline {\XINT_tmpa }{% {|{iii}{vi}{OR}}% {&{iv}{vi}{AND}}% {<{v}{vi}{Lt}}% {>{v}{vi}{Gt}}% {={v}{vi}{Eq}}% }% -\def\xint_tmp_def_a #1{\xint_tmp_def {flexpr}{XINTinFloat}#1}% -\xintApplyInline {\xint_tmp_def_a }{% +\def\XINT_tmpa #1{\XINT_tmpb {flexpr}{XINTinFloat}#1}% +\xintApplyInline {\XINT_tmpa }{% {+{vi}{vi}{Add}}% {-{vi}{vi}{Sub}}% {*{vii}{vii}{Mul}}% @@ -469,8 +469,7 @@ {e{ix}{ix}{fE}}% {E{ix}{ix}{fE}}% }% -\let\xint_tmp_def_a\empty -\def\xint_tmp_do_defs #1#2#3#4#5#6% +\def\XINT_tmpa #1#2#3#4#5#6% {% \def #1##1% \XINT_expr_op_,_a {% @@ -494,27 +493,27 @@ }% \let #5\xint_c_ii }% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_expr_op_,\expandafter\endcsname \csname XINT_expr_until_,_a\expandafter\endcsname \csname XINT_expr_until_,_b\expandafter\endcsname \csname XINT_expr_op_-vi\expandafter\endcsname \csname XINT_expr_precedence_,\endcsname {expr}% -\expandafter\xint_tmp_do_defs +\expandafter\XINT_tmpa \csname XINT_flexpr_op_,\expandafter\endcsname \csname XINT_flexpr_until_,_a\expandafter\endcsname \csname XINT_flexpr_until_,_b\expandafter\endcsname \csname XINT_flexpr_op_-vi\expandafter\endcsname \csname XINT_expr_precedence_,\endcsname {flexpr}% -\def\xint_tmp_def #1#2% +\def\XINT_tmpa #1#2% {% - \expandafter\xint_tmp_do_defs + \expandafter\XINT_tmpb \csname XINT_#1_op_-#2\expandafter\endcsname \csname XINT_#1_until_-#2_a\expandafter\endcsname \csname XINT_#1_until_-#2_b\expandafter\endcsname \csname xint_c_#2\endcsname {#1}% }% -\def\xint_tmp_do_defs #1#2#3#4#5% +\def\XINT_tmpb #1#2#3#4#5% {% \def #1% \XINT_expr_op_-<level> {% get next number+operator then switch to _until macro @@ -536,8 +535,8 @@ \fi }% }% -\xintApplyInline{\xint_tmp_def {expr}}{{vi}{vii}{viii}{ix}}% -\xintApplyInline{\xint_tmp_def {flexpr}}{{vi}{vii}{viii}{ix}}% +\xintApplyInline{\XINT_tmpa {expr}}{{vi}{vii}{viii}{ix}}% +\xintApplyInline{\XINT_tmpa {flexpr}}{{vi}{vii}{viii}{ix}}% \let\XINT_expr_precedence_? \xint_c_x \def \XINT_expr_op_? #1#2#3% {% @@ -559,8 +558,6 @@ \def\XINT_expr_op_! #1{\expandafter\XINT_expr_getop \csname .\xintFac{\XINT_expr_unlock #1}\endcsname }% [0] removed in 1.09c \let\XINT_flexpr_op_!\XINT_expr_op_! -\let\xint_tmp_def\empty -\let\xint_tmp_do_defs\empty \def\XINT_expr_op_@ #1% {% \ifcsname XINT_expr_onlitteral_#1\endcsname @@ -842,7 +839,7 @@ FloatMaxof,FloatMinof,Sum,Prd,FloatSum,FloatPrd} \do {\toks0 \expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname - ####1{_xint#1 {\xintCSVtoList {####1}}}}}% + ####1{_xint#1 {\xintCSVtoListNonStripped {####1}}}}}% \xintFor #1 in {,Sqrt,Add,Sub,Mul,Div,Power,fE} \do {\toks0 \expandafter{\the\toks0\expandafter\def\csname XINTinFloat#1\endcsname @@ -850,13 +847,13 @@ \expandafter\def\expandafter\XINT_expr_protect\expandafter{\the\toks0 \def\XINTdigits {_XINTdigits}% \def\XINT_expr_print ##1{\expandafter\XINT_newexpr_print\expandafter - {\romannumeral0\xintcsvtolist{\XINT_expr_unlock ##1}}}% + {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}% \def\XINT_flexpr_print ##1{\expandafter\XINT_newflexpr_print\expandafter - {\romannumeral0\xintcsvtolist{\XINT_expr_unlock ##1}}}% + {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}% \def\XINT_numexpr_print ##1{\expandafter\XINT_newnumexpr_print\expandafter - {\romannumeral0\xintcsvtolist{\XINT_expr_unlock ##1}}}% + {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}% \def\XINT_boolexpr_print ##1{\expandafter\XINT_newboolexpr_print\expandafter - {\romannumeral0\xintcsvtolist{\XINT_expr_unlock ##1}}}% + {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}% }% \toks0 {}% \def\xintNewExpr {\xint_NewExpr\xinttheexpr }% @@ -949,6 +946,7 @@ \catcode44=12 % , \catcode61=12 % = }% +\let\XINT_tmpa\relax \let\XINT_tmpb\relax \let\XINT_tmpc\relax \XINT_restorecatcodes_endinput% \endinput %% |