summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintexpr.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-10-20 21:19:41 +0000
committerKarl Berry <karl@freefriends.org>2015-10-20 21:19:41 +0000
commitc0fd6688c3703e0e3835fea389bccdf0fc0e6902 (patch)
treecf3c9c4ab195d5cab18184a06fa70fe7c4f8073c /Master/texmf-dist/tex/generic/xint/xintexpr.sty
parentcf6885a752177d109d39e62098ee48cb8745580a (diff)
xint (20oct15)
git-svn-id: svn://tug.org/texlive/trunk@38680 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintexpr.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty402
1 files changed, 205 insertions, 197 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 72e5194b49e..ce9b596606d 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle v1.2 2015/10/10
+%% The xint bundle v1.2a 2015/10/19
%% Copyright (C) 2013-2015 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2015/10/10 v1.2 Expandable expression parser (jfB)]%
+ [2015/10/19 v1.2a Expandable expression parser (jfB)]%
\catcode`! 11
\def\xint_gob_til_! #1!{}% catcode 11 ! default in xintexpr.sty code.
\edef\XINT_expr_lockscan#1!% not used for decimal numbers in xintexpr 1.2
@@ -89,7 +89,7 @@
\edef\XINT_expr_lockit
#1{\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
\def\XINT_expr_unlock_hex_in #1% expanded inside \csname..\endcsname
- {\expandafter\XINT_expr_inhex\romannumeral-`0\XINT_expr_unlock#1;}%
+ {\expandafter\XINT_expr_inhex\romannumeral`&&@\XINT_expr_unlock#1;}%
\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
{%
\if#2>\xintHexToDec{#1}%
@@ -115,27 +115,27 @@
\def\xintfloatexpr {\romannumeral0\xintfloateval }%
\def\xintiiexpr {\romannumeral0\xintiieval }%
\def\xinttheexpr
- {\romannumeral-`0\expandafter\XINT_expr_print\romannumeral0\xintbareeval }%
-\def\xinttheiexpr {\romannumeral-`0\xintthe\xintiexpr }%
-\def\xintthefloatexpr {\romannumeral-`0\xintthe\xintfloatexpr }%
+ {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval }%
+\def\xinttheiexpr {\romannumeral`&&@\xintthe\xintiexpr }%
+\def\xintthefloatexpr {\romannumeral`&&@\xintthe\xintfloatexpr }%
\def\xinttheiiexpr
- {\romannumeral-`0\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval }%
-\def\xintthe #1{\romannumeral-`0\expandafter\xint_gobble_iii\romannumeral-`0#1}%
-\def\xintthecoords #1{\romannumeral-`0\expandafter\expandafter\expandafter
+ {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval }%
+\def\xintthe #1{\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@#1}%
+\def\xintthecoords #1{\romannumeral`&&@\expandafter\expandafter\expandafter
\XINT_thecoords_a
\expandafter\xint_gobble_iii\romannumeral0#1}%
\def\XINT_thecoords_a #1#2% #1=print macro, indispensible for scientific notation
{\expandafter\XINT_expr_unlock\csname.=\expandafter\XINT_thecoords_b
- \romannumeral-`0#1#2,!,!,^\endcsname }%
+ \romannumeral`&&@#1#2,!,!,^\endcsname }%
\def\XINT_thecoords_b #1#2,#3#4,%
{\xint_gob_til_! #3\XINT_thecoords_c ! (#1#2, #3#4)\XINT_thecoords_b }%
\def\XINT_thecoords_c #1^{}%
\def\xintbareeval
- {\expandafter\XINT_expr_until_end_a\romannumeral-`0\XINT_expr_getnext }%
+ {\expandafter\XINT_expr_until_end_a\romannumeral`&&@\XINT_expr_getnext }%
\def\xintbarefloateval
- {\expandafter\XINT_flexpr_until_end_a\romannumeral-`0\XINT_expr_getnext }%
+ {\expandafter\XINT_flexpr_until_end_a\romannumeral`&&@\XINT_expr_getnext }%
\def\xintbareiieval
- {\expandafter\XINT_iiexpr_until_end_a\romannumeral-`0\XINT_expr_getnext }%
+ {\expandafter\XINT_iiexpr_until_end_a\romannumeral`&&@\XINT_expr_getnext }%
\def\xinteval {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }%
\def\xintiieval {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }%
\def\xintieval #1%
@@ -178,41 +178,41 @@
\def\XINT_flexpr_print #1%
{%
\expandafter\xintPFloat::csv
- \romannumeral-`0\expandafter\XINT_expr_unlock_sp\string #1!%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock_sp\string #1!%
}%
\catcode`: 12
\def\XINT_expr_unlock_sp #1.;#2.=#3!{{#2}{#3}}%
\catcode`: 11
\def\xintboolexpr {\romannumeral0\expandafter\expandafter\expandafter
\XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval }%
-\def\xinttheboolexpr {\romannumeral-`0\expandafter\expandafter\expandafter
+\def\xinttheboolexpr {\romannumeral`&&@\expandafter\expandafter\expandafter
\XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval }%
\def\XINT_boolexpr_done { !\XINT_expr_usethe\XINT_protectii\XINT_boolexpr_print }%
\def\xintifboolexpr #1{\romannumeral0\xintifnotzero {\xinttheexpr #1\relax}}%
\def\xintifboolfloatexpr #1{\romannumeral0\xintifnotzero {\xintthefloatexpr #1\relax}}%
\def\xintifbooliiexpr #1{\romannumeral0\xintifnotzero {\xinttheiiexpr #1\relax}}%
\def\XINT_::_end #1,#2{\xint_gobble_i #2}%
-\def\xintCSV::csv #1{\expandafter\XINT_csv::_a\romannumeral-`0#1,^,}%
+\def\xintCSV::csv #1{\expandafter\XINT_csv::_a\romannumeral`&&@#1,^,}%
\def\XINT_csv::_a {\XINT_csv::_b {}}%
-\def\XINT_csv::_b #1#2,{\expandafter\XINT_csv::_c \romannumeral-`0#2,{#1}}%
+\def\XINT_csv::_b #1#2,{\expandafter\XINT_csv::_c \romannumeral`&&@#2,{#1}}%
\def\XINT_csv::_c #1{\if ^#1\expandafter\XINT_::_end\fi\XINT_csv::_d #1}%
\def\XINT_csv::_d #1,#2{\XINT_csv::_b {#2, #1}}% possibly, item #1 is empty.
\def\xintSPRaw {\romannumeral0\xintspraw }%
-\def\xintspraw #1{\expandafter\XINT_spraw\romannumeral-`0#1[\W]}%
+\def\xintspraw #1{\expandafter\XINT_spraw\romannumeral`&&@#1[\W]}%
\def\XINT_spraw #1[#2#3]{\xint_gob_til_W #2\XINT_spraw_a\W\XINT_spraw_p #1[#2#3]}%
\def\XINT_spraw_a\W\XINT_spraw_p #1[\W]{ #1}%
\def\XINT_spraw_p #1[\W]{\xintpraw {#1}}%
-\def\xintSPRaw::csv #1{\romannumeral0\expandafter\XINT_spraw::_a\romannumeral-`0#1,^,}%
+\def\xintSPRaw::csv #1{\romannumeral0\expandafter\XINT_spraw::_a\romannumeral`&&@#1,^,}%
\def\XINT_spraw::_a {\XINT_spraw::_b {}}%
-\def\XINT_spraw::_b #1#2,{\expandafter\XINT_spraw::_c \romannumeral-`0#2,{#1}}%
+\def\XINT_spraw::_b #1#2,{\expandafter\XINT_spraw::_c \romannumeral`&&@#2,{#1}}%
\def\XINT_spraw::_c #1{\if ,#1\xint_dothis\XINT_spraw::_e\fi
\if ^#1\xint_dothis\XINT_::_end\fi
\xint_orthat\XINT_spraw::_d #1}%
\def\XINT_spraw::_d #1,{\expandafter\XINT_spraw::_e\romannumeral0\XINT_spraw #1[\W],}%
\def\XINT_spraw::_e #1,#2{\XINT_spraw::_b {#2, #1}}%
-\def\xintIsTrue::csv #1{\romannumeral0\expandafter\XINT_istrue::_a\romannumeral-`0#1,^,}%
+\def\xintIsTrue::csv #1{\romannumeral0\expandafter\XINT_istrue::_a\romannumeral`&&@#1,^,}%
\def\XINT_istrue::_a {\XINT_istrue::_b {}}%
-\def\XINT_istrue::_b #1#2,{\expandafter\XINT_istrue::_c \romannumeral-`0#2,{#1}}%
+\def\XINT_istrue::_b #1#2,{\expandafter\XINT_istrue::_c \romannumeral`&&@#2,{#1}}%
\def\XINT_istrue::_c #1{\if ,#1\xint_dothis\XINT_istrue::_e\fi
\if ^#1\xint_dothis\XINT_::_end\fi
\xint_orthat\XINT_istrue::_d #1}%
@@ -220,8 +220,8 @@
\def\XINT_istrue::_e #1,#2{\XINT_istrue::_b {#2, #1}}%
\def\XINT_:::_end #1,#2#3{\xint_gobble_i #3}%
\def\xintRound::csv #1#2{\romannumeral0\expandafter\XINT_round::_b\expandafter
- {\the\numexpr#1\expandafter}\expandafter{\expandafter}\romannumeral-`0#2,^,}%
-\def\XINT_round::_b #1#2#3,{\expandafter\XINT_round::_c \romannumeral-`0#3,{#1}{#2}}%
+ {\the\numexpr#1\expandafter}\expandafter{\expandafter}\romannumeral`&&@#2,^,}%
+\def\XINT_round::_b #1#2#3,{\expandafter\XINT_round::_c \romannumeral`&&@#3,{#1}{#2}}%
\def\XINT_round::_c #1{\if ,#1\xint_dothis\XINT_round::_e\fi
\if ^#1\xint_dothis\XINT_:::_end\fi
\xint_orthat\XINT_round::_d #1}%
@@ -230,7 +230,7 @@
\expandafter\xintround\else\expandafter\xintiround\fi {#2}{#1},{#2}}%
\def\XINT_round::_e #1,#2#3{\XINT_round::_b {#2}{#3, #1}}%
\def\XINTinFloat::csv #1#2{\romannumeral0\expandafter\XINT_infloat::_b\expandafter
- {\the\numexpr #1\expandafter}\expandafter{\expandafter}\romannumeral-`0#2,^,}%
+ {\the\numexpr #1\expandafter}\expandafter{\expandafter}\romannumeral`&&@#2,^,}%
\def\XINT_infloat::_b #1#2#3,{\XINT_infloat::_c #3,{#1}{#2}}%
\def\XINT_infloat::_c #1{\if ,#1\xint_dothis\XINT_infloat::_e\fi
\if ^#1\xint_dothis\XINT_:::_end\fi
@@ -239,8 +239,8 @@
{\expandafter\XINT_infloat::_e\romannumeral0\XINTinfloat [#2]{#1},{#2}}%
\def\XINT_infloat::_e #1,#2#3{\XINT_infloat::_b {#2}{#3, #1}}%
\def\xintPFloat::csv #1#2{\romannumeral0\expandafter\XINT_pfloat::_b\expandafter
- {\the\numexpr #1\expandafter}\expandafter{\expandafter}\romannumeral-`0#2,^,}%
-\def\XINT_pfloat::_b #1#2#3,{\expandafter\XINT_pfloat::_c \romannumeral-`0#3,{#1}{#2}}%
+ {\the\numexpr #1\expandafter}\expandafter{\expandafter}\romannumeral`&&@#2,^,}%
+\def\XINT_pfloat::_b #1#2#3,{\expandafter\XINT_pfloat::_c \romannumeral`&&@#3,{#1}{#2}}%
\def\XINT_pfloat::_c #1{\if ,#1\xint_dothis\XINT_pfloat::_e\fi
\if ^#1\xint_dothis\XINT_:::_end\fi
\xint_orthat\XINT_pfloat::_d #1}%
@@ -249,7 +249,7 @@
\def\XINT_pfloat::_e #1,#2#3{\XINT_pfloat::_b {#2}{#3, #1}}%
\def\XINT_expr_getnext #1%
{%
- \expandafter\XINT_expr_getnext_a\romannumeral-`0#1%
+ \expandafter\XINT_expr_getnext_a\romannumeral`&&@#1%
}%
\def\XINT_expr_getnext_a #1%
{% screens out sub-expressions and \count or \dimen registers/variables
@@ -304,13 +304,13 @@
}%
\def\XINT_expr_scanint_a #1#2%
{\expandafter\XINT_expr_getop\csname.=#1%
- \expandafter\XINT_expr_scanint_b\romannumeral-`0#2}%
+ \expandafter\XINT_expr_scanint_b\romannumeral`&&@#2}%
\def\XINT_expr_gobz_a #1%
{\expandafter\XINT_expr_getop\csname.=%
- \expandafter\XINT_expr_gobz_scanint_b\romannumeral-`0#1}%
+ \expandafter\XINT_expr_gobz_scanint_b\romannumeral`&&@#1}%
\def\XINT_expr_startdec #1%
{\expandafter\XINT_expr_getop\csname.=%
- \expandafter\XINT_expr_scandec_a\romannumeral-`0#1}%
+ \expandafter\XINT_expr_scandec_a\romannumeral`&&@#1}%
\def\XINT_expr_scanint_b #1%
{%
\ifcat \relax #1\expandafter\XINT_expr_scanint_endbycs\expandafter #1\fi
@@ -319,7 +319,7 @@
}%
\def\XINT_expr_scanint_d #1%
{%
- \expandafter\XINT_expr_scanint_b\romannumeral-`0#1%
+ \expandafter\XINT_expr_scanint_b\romannumeral`&&@#1%
}%
\def\XINT_expr_scanint_endbycs#1#2\XINT_expr_scanint_d{\endcsname #1}%
\def\XINT_expr_scanint_c\string #1\XINT_expr_scanint_d
@@ -332,7 +332,7 @@
}%
\def\XINT_expr_startdec_a .#1%
{%
- \expandafter\XINT_expr_scandec_a\romannumeral-`0#1%
+ \expandafter\XINT_expr_scandec_a\romannumeral`&&@#1%
}%
\def\XINT_expr_scandec_a #1%
{%
@@ -357,11 +357,11 @@
}%
\def\XINT_expr_gobz_scanint_d #1%
{%
- \expandafter\XINT_expr_gobz_scanint_b\romannumeral-`0#1%
+ \expandafter\XINT_expr_gobz_scanint_b\romannumeral`&&@#1%
}%
\def\XINT_expr_gobz_startdec_a .#1%
{%
- \expandafter\XINT_expr_gobz_scandec_a\romannumeral-`0#1%
+ \expandafter\XINT_expr_gobz_scandec_a\romannumeral`&&@#1%
}%
\def\XINT_expr_gobz_scandec_a #1%
{%
@@ -379,7 +379,7 @@
\def\XINT_expr_scandec_d #1.#2%
{%
\expandafter\XINT_expr_scandec_b
- \the\numexpr #1\expandafter.\romannumeral-`0#2%
+ \the\numexpr #1\expandafter.\romannumeral`&&@#2%
}%
\def\XINT_expr_scandec_c\string #1#2\the\numexpr#3-\xint_c_i.%
{%
@@ -388,14 +388,16 @@
\ifcat a#1\xint_dothis{[#3]\endcsname *#1}\fi
\xint_orthat {[#3]\expandafter\endcsname \string#1}%
}%
-\def\XINT_expr_gobz_scandec_b 0.#1%
+\def\XINT_expr_gobz_scandec_b #1.#2%
{%
- \ifcat \relax #1\expandafter\XINT_expr_gobz_scandec_endbycs\expandafter#1\fi
- \ifnum\xint_c_ix<1\string#1 \else\expandafter\XINT_expr_gobz_scandec_c\fi
- \string#1\expandafter\XINT_expr_scandec_d\the\numexpr\xint_c_mone.%
+ \ifcat \relax #2\expandafter\XINT_expr_gobz_scandec_endbycs\expandafter#2\fi
+ \ifnum\xint_c_ix<1\string#2 \else\expandafter\XINT_expr_gobz_scandec_c\fi
+ \if0#2\expandafter\xint_firstoftwo\else\expandafter\xint_secondoftwo\fi
+ {\expandafter\XINT_expr_gobz_scandec_b}%
+ {\string#2\expandafter\XINT_expr_scandec_d}\the\numexpr#1-\xint_c_i.%
}%
-\def\XINT_expr_gobz_scandec_endbycs #1#2\xint_c_mone.{0[0]\endcsname #1}%
-\def\XINT_expr_gobz_scandec_c\string #1#2\xint_c_mone.%
+\def\XINT_expr_gobz_scandec_endbycs #1#2\xint_c_i.{0[0]\endcsname #1}%
+\def\XINT_expr_gobz_scandec_c\if0#1#2\fi #3\xint_c_i.%
{%
\if e#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if E#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
@@ -404,7 +406,7 @@
}%
\def\XINT_expr_scanexp_a #1#2%
{%
- #1\expandafter\XINT_expr_scanexp_b\romannumeral-`0#2%
+ #1\expandafter\XINT_expr_scanexp_b\romannumeral`&&@#2%
}%
\def\XINT_expr_scanexp_b #1%
{%
@@ -415,7 +417,7 @@
\def\XINT_expr_scanexpr_endbycs#1#2\XINT_expr_scanexp_d {]\endcsname #1}%
\def\XINT_expr_scanexp_d #1%
{%
- \expandafter\XINT_expr_scanexp_bb\romannumeral-`0#1%
+ \expandafter\XINT_expr_scanexp_bb\romannumeral`&&@#1%
}%
\def\XINT_expr_scanexp_c\string #1\XINT_expr_scanexp_d
{%
@@ -433,7 +435,7 @@
\def\XINT_expr_scanexp_endbycs_b#1#2\XINT_expr_scanexp_db {]\endcsname #1}%
\def\XINT_expr_scanexp_db #1%
{%
- \expandafter\XINT_expr_scanexp_bb\romannumeral-`0#1%
+ \expandafter\XINT_expr_scanexp_bb\romannumeral`&&@#1%
}%
\def\XINT_expr_scanexp_cb\string #1\XINT_expr_scanexp_db
{%
@@ -472,12 +474,12 @@
}%
\def\XINT_expr_scanhexI_b #1#2%
{%
- #1\expandafter\XINT_expr_scanhexI_a\romannumeral-`0#2%
+ #1\expandafter\XINT_expr_scanhexI_a\romannumeral`&&@#2%
}%
\def\XINT_expr_scanhex_transition .#1%
{%
\expandafter.\expandafter.\expandafter
- \XINT_expr_scanhexII_a\romannumeral-`0#1%
+ \XINT_expr_scanhexII_a\romannumeral`&&@#1%
}%
\def\XINT_expr_scanhexII_a #1%
{%
@@ -500,15 +502,15 @@
}%
\def\XINT_expr_scanhexII_b #1#2%
{%
- #1\expandafter\XINT_expr_scanhexII_a\romannumeral-`0#2%
+ #1\expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#2%
}%
\def\XINT_expr_scanfunc
{%
- \expandafter\XINT_expr_func\romannumeral-`0\XINT_expr_scanfunc_a
+ \expandafter\XINT_expr_func\romannumeral`&&@\XINT_expr_scanfunc_a
}%
\def\XINT_expr_scanfunc_a #1#2%
{%
- \expandafter #1\romannumeral-`0\expandafter\XINT_expr_scanfunc_b\romannumeral-`0#2%
+ \expandafter #1\romannumeral`&&@\expandafter\XINT_expr_scanfunc_b\romannumeral`&&@#2%
}%
\def\XINT_expr_scanfunc_b #1%
{%
@@ -531,7 +533,7 @@
}%
\def\XINT_expr_getop #1#2% this #1 is the current locked computed value
{%
- \expandafter\XINT_expr_getop_a\expandafter #1\romannumeral-`0#2%
+ \expandafter\XINT_expr_getop_a\expandafter #1\romannumeral`&&@#2%
}%
\catcode`* 11
\def\XINT_expr_getop_a #1#2%
@@ -558,7 +560,7 @@
\def\XINT_expr_binopwrd #1#2'{\expandafter\XINT_expr_foundop_a
\csname XINT_expr_itself_\xint_zapspaces #2 \xint_gobble_i\endcsname #1}%
\def\XINT_expr_scanop_a #1#2#3%
- {\expandafter\XINT_expr_scanop_b\expandafter #1\expandafter #2\romannumeral-`0#3}%
+ {\expandafter\XINT_expr_scanop_b\expandafter #1\expandafter #2\romannumeral`&&@#3}%
\def\XINT_expr_scanop_b #1#2#3%
{%
\ifcat#3\relax\xint_dothis{\XINT_expr_foundop_a #1#2#3}\fi
@@ -569,7 +571,7 @@
}%
\def\XINT_expr_scanop_c #1#2#3%
{%
- \expandafter\XINT_expr_scanop_d\expandafter #1\expandafter #2\romannumeral-`0#3%
+ \expandafter\XINT_expr_scanop_d\expandafter #1\expandafter #2\romannumeral`&&@#3%
}%
\def\XINT_expr_scanop_d #1#2#3%
{%
@@ -596,7 +598,7 @@
\def#1##1%
{%
\xint_UDsignfork
- ##1{\expandafter#1\romannumeral-`0#3}%
+ ##1{\expandafter#1\romannumeral`&&@#3}%
-{#2##1}%
\krof
}%
@@ -604,12 +606,12 @@
{%
\ifcase ##1\xint_afterfi
{\ifx\XINT_expr_itself_^C ##2\xint_dothis
- {\expandafter#1\romannumeral-`0\expandafter\XINT_expr_getnext\xint_gobble_i}\fi
+ {\expandafter#1\romannumeral`&&@\expandafter\XINT_expr_getnext\xint_gobble_i}\fi
\xint_orthat \XINT_expr_done }%
\or\xint_afterfi{\XINT_expr_extra_)
- \expandafter #1\romannumeral-`0\XINT_expr_getop }%
+ \expandafter #1\romannumeral`&&@\XINT_expr_getop }%
\else
- \xint_afterfi{\expandafter#1\romannumeral-`0\csname XINT_#4_op_##2\endcsname }%
+ \xint_afterfi{\expandafter#1\romannumeral`&&@\csname XINT_#4_op_##2\endcsname }%
\fi
}%
}%
@@ -623,10 +625,10 @@
}%
\def\XINT_tmpa #1#2#3#4#5#6%
{%
- \def #1##1{\expandafter #3\romannumeral-`0\XINT_expr_getnext }%
- \def #2{\expandafter #3\romannumeral-`0\XINT_expr_getnext }%
+ \def #1##1{\expandafter #3\romannumeral`&&@\XINT_expr_getnext }%
+ \def #2{\expandafter #3\romannumeral`&&@\XINT_expr_getnext }%
\def #3##1{\xint_UDsignfork
- ##1{\expandafter #3\romannumeral-`0#5}%
+ ##1{\expandafter #3\romannumeral`&&@#5}%
-{#4##1}%
\krof }%
\def #4##1##2{\ifcase ##1%
@@ -634,7 +636,7 @@
\xint_orthat\XINT_expr_missing_) }%
\or \csname XINT_#6_op_##2\expandafter\endcsname
\else
- \xint_afterfi{\expandafter #3\romannumeral-`0\csname XINT_#6_op_##2\endcsname }%
+ \xint_afterfi{\expandafter #3\romannumeral`&&@\csname XINT_#6_op_##2\endcsname }%
\fi
}%
}%
@@ -666,24 +668,26 @@
{\expandafter\.=+\xintiCeil{\XINT_expr_unlock ##1}}}%
}%
\catcode`. 12 \catcode`= 12 \catcode`+ 12
+\catcode`& 12
\xintFor* #1 in {{==}{<=}{>=}{!=}{&&}{||}{**}{//}{/:}{..}{..[}{].}{]..}%
{+[}{-[}{*[}{/[}{**[}{^[}{a+}{a-}{a*}{a/}{a**}{a^}%
{][}{][:}{:]}{^C}{++}{++)}}
\do {\expandafter\def\csname XINT_expr_itself_#1\endcsname {#1}}%
+\catcode`& 7
\def\XINT_tmpc #1#2#3#4#5#6#7#8%
{%
\def #1##1% \XINT_expr_op_<op> ou flexpr ou iiexpr
{% keep value, get next number and operator, then do until
\expandafter #2\expandafter ##1%
- \romannumeral-`0\expandafter\XINT_expr_getnext }%
+ \romannumeral`&&@\expandafter\XINT_expr_getnext }%
\def #2##1##2% \XINT_expr_until_<op>_a ou flexpr ou iiexpr
- {\xint_UDsignfork ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
+ {\xint_UDsignfork ##2{\expandafter #2\expandafter ##1\romannumeral`&&@#4}%
-{#3##1##2}%
\krof }%
\def #3##1##2##3##4% \XINT_expr_until_<op>_b ou flexpr ou iiexpr
{% either execute next operation now, or first do next (possibly unary)
\ifnum ##2>#5%
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#8_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
\csname .=#6{\XINT_expr_unlock ##1}{\XINT_expr_unlock ##4}\endcsname }%
@@ -701,6 +705,7 @@
\csname #2#6\expandafter\endcsname
\csname XINT_expr_precedence_#3\endcsname {#1}%
}%
+\catcode`& 12
\xintFor #1 in {expr, flexpr} \do {%
\def\XINT_tmpa ##1{\XINT_tmpb {#1}{xint}##1}%
\xintApplyInline {\XINT_tmpa }{%
@@ -718,6 +723,7 @@
{{/:}{vii}{vii}{Mod}}%
}%
}%
+\catcode`& 7
\def\XINT_tmpa #1{\XINT_tmpb {expr}{xint}#1}%
\xintApplyInline {\XINT_tmpa }{%
{+{vi}{vi}{Add}}%
@@ -739,6 +745,7 @@
{{]..}{iii}{vi}{SeqB::csv}}%
}%
\def\XINT_tmpa #1{\XINT_tmpb {iiexpr}{xint}#1}%
+\catcode`& 12
\xintApplyInline {\XINT_tmpa }{%
{|{iii}{vi}{OR}}%
{&{iv}{vi}{AND}}%
@@ -760,8 +767,9 @@
{{//}{vii}{vii}{iiDivTrunc}}%
{{/:}{vii}{vii}{iiMod}}%
}%
+\catcode`& 7
\def\XINT_expr_binop_inline_a
- {\expandafter\xint_gobble_i\romannumeral-`0\XINT_expr_binop_inline_b }%
+ {\expandafter\xint_gobble_i\romannumeral`&&@\XINT_expr_binop_inline_b }%
\def\XINT_expr_binop_inline_b #1#2,{\XINT_expr_binop_inline_c #2,{#1}}%
\def\XINT_expr_binop_inline_c #1{%
\if ,#1\xint_dothis\XINT_expr_binop_inline_e\fi
@@ -775,22 +783,22 @@
\def #1##1% \XINT_expr_op_<op> ou flexpr ou iiexpr
{% keep value, get next number and operator, then do until
\expandafter #2\expandafter ##1%
- \romannumeral-`0\expandafter\XINT_expr_getnext }%
+ \romannumeral`&&@\expandafter\XINT_expr_getnext }%
\def #2##1##2% \XINT_expr_until_<op>_a ou flexpr ou iiexpr
- {\xint_UDsignfork ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
+ {\xint_UDsignfork ##2{\expandafter #2\expandafter ##1\romannumeral`&&@#4}%
-{#3##1##2}%
\krof }%
\def #3##1##2##3##4% \XINT_expr_until_<op>_b ou flexpr ou iiexpr
{% either execute next operation now, or first do next (possibly unary)
\ifnum ##2>#5%
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#8_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
\csname .=\expandafter\XINT_expr_binop_inline_a\expandafter
{\expandafter\expandafter\expandafter#6\expandafter
\xint_exchangetwo_keepbraces\expandafter
{\expandafter\XINT_expr_unlock\expandafter ##4\expandafter}\expandafter}%
- \romannumeral-`0\XINT_expr_unlock ##1,^,\endcsname }%
+ \romannumeral`&&@\XINT_expr_unlock ##1,^,\endcsname }%
\fi }%
\let #7#5%
}%
@@ -824,18 +832,18 @@
}%
\def\XINT_tmpc #1#2#3#4#5#6#7%
{%
- \def #1##1{\expandafter#2\expandafter##1\romannumeral-`0%
- \expandafter #3\romannumeral-`0\XINT_expr_getnext }%
+ \def #1##1{\expandafter#2\expandafter##1\romannumeral`&&@%
+ \expandafter #3\romannumeral`&&@\XINT_expr_getnext }%
\def #2##1##2##3##4%
{% either execute next operation now, or first do next (possibly unary)
\ifnum ##2>#4%
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#7_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
\csname .=\expandafter\XINT_expr_binop_inline_a\expandafter
{\expandafter#5\expandafter
{\expandafter\XINT_expr_unlock\expandafter ##1\expandafter}\expandafter}%
- \romannumeral-`0\XINT_expr_unlock ##4,^,\endcsname }%
+ \romannumeral`&&@\XINT_expr_unlock ##4,^,\endcsname }%
\fi }%
\let #6#4%
}%
@@ -869,14 +877,14 @@
\xintFor #1 in {and,or,xor,mod} \do {%
\expandafter\def\csname XINT_expr_itself_#1\endcsname {#1}}%
\expandafter\let\csname XINT_expr_precedence_and\expandafter\endcsname
- \csname XINT_expr_precedence_&\endcsname
+ \csname XINT_expr_precedence_\string&\endcsname
\expandafter\let\csname XINT_expr_precedence_or\expandafter\endcsname
\csname XINT_expr_precedence_|\endcsname
\expandafter\let\csname XINT_expr_precedence_mod\expandafter\endcsname
\csname XINT_expr_precedence_/:\endcsname
\xintFor #1 in {expr, flexpr, iiexpr} \do {%
\expandafter\let\csname XINT_#1_op_and\expandafter\endcsname
- \csname XINT_#1_op_&\endcsname
+ \csname XINT_#1_op_\string&\endcsname
\expandafter\let\csname XINT_#1_op_or\expandafter\endcsname
\csname XINT_#1_op_|\endcsname
\expandafter\let\csname XINT_#1_op_mod\expandafter\endcsname
@@ -884,8 +892,8 @@
}%
\expandafter\let\csname XINT_expr_precedence_==\expandafter\endcsname
\csname XINT_expr_precedence_=\endcsname
-\expandafter\let\csname XINT_expr_precedence_&&\expandafter\endcsname
- \csname XINT_expr_precedence_&\endcsname
+\expandafter\let\csname XINT_expr_precedence_\string&\string&\expandafter\endcsname
+ \csname XINT_expr_precedence_\string&\endcsname
\expandafter\let\csname XINT_expr_precedence_||\expandafter\endcsname
\csname XINT_expr_precedence_|\endcsname
\expandafter\let\csname XINT_expr_precedence_**\expandafter\endcsname
@@ -897,8 +905,8 @@
\xintFor #1 in {expr, flexpr, iiexpr} \do {%
\expandafter\let\csname XINT_#1_op_==\expandafter\endcsname
\csname XINT_#1_op_=\endcsname
- \expandafter\let\csname XINT_#1_op_&&\expandafter\endcsname
- \csname XINT_#1_op_&\endcsname
+ \expandafter\let\csname XINT_#1_op_\string&\string&\expandafter\endcsname
+ \csname XINT_#1_op_\string&\endcsname
\expandafter\let\csname XINT_#1_op_||\expandafter\endcsname
\csname XINT_#1_op_|\endcsname
\expandafter\let\csname XINT_#1_op_**\expandafter\endcsname
@@ -912,22 +920,22 @@
{%
\def #1##1% \XINT_expr_op_][
{%
- \expandafter #2\expandafter ##1\romannumeral-`0\XINT_expr_getnext
+ \expandafter #2\expandafter ##1\romannumeral`&&@\XINT_expr_getnext
}%
\def #2##1##2% \XINT_expr_until_][_a
{\xint_UDsignfork
- ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
+ ##2{\expandafter #2\expandafter ##1\romannumeral`&&@#4}%
-{#3##1##2}%
\krof }%
\def #3##1##2##3##4% \XINT_expr_until_][_b
{%
\ifnum ##2>\xint_c_ii
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#6_op_##3\endcsname {##4}}%
\else
\xint_afterfi
{\expandafter ##2\expandafter ##3\csname
- .=\expandafter\xintListSel:csv \romannumeral-`0\XINT_expr_unlock ##4;%
+ .=\expandafter\xintListSel:csv \romannumeral`&&@\XINT_expr_unlock ##4;%
\XINT_expr_unlock ##1;\endcsname % unlock for \xintNewExpr
}%
\fi
@@ -946,17 +954,17 @@
{%
\def #1##1% \XINT_expr_op_:
{%
- \expandafter #2\expandafter ##1\romannumeral-`0\XINT_expr_getnext
+ \expandafter #2\expandafter ##1\romannumeral`&&@\XINT_expr_getnext
}%
\def #2##1##2% \XINT_expr_until_:_a
{\xint_UDsignfork
- ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
+ ##2{\expandafter #2\expandafter ##1\romannumeral`&&@#4}%
-{#3##1##2}%
\krof }%
\def #3##1##2##3##4% \XINT_expr_until_:_b
{%
\ifnum ##2>\xint_c_iii
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#6_op_##3\endcsname {##4}}%
\else
\xint_afterfi
@@ -990,7 +998,7 @@
\let\XINT_iiexpr_op_][: \XINT_expr_op_][:
\catcode`[ 12 \catcode`] 12
\def\xintListSel:csv #1{%
- \if ]\noexpand#1\xint_dothis{\expandafter\XINT_listsel:_s\romannumeral-`0}\fi
+ \if ]\noexpand#1\xint_dothis{\expandafter\XINT_listsel:_s\romannumeral`&&@}\fi
\if :\noexpand#1\xint_dothis{\XINT_listsel:_:}\fi
\xint_orthat {\XINT_listsel:_nth #1}%
}%
@@ -1111,8 +1119,8 @@
\def\XINT_seqa::csv #1#2{\expandafter\XINT_seqa::csv_a \romannumeral0\xintraw {#2};#1;}%
\def\xintiiSeqA::csv #1#2{\XINT_iiseqa::csv #1#2}%
\def\XINT_iiseqa::csv #1#2#3#4{\expandafter\XINT_seqa::csv_a
- \romannumeral-`0\expandafter \XINT_expr_unlock\expandafter#4%
- \expandafter;\romannumeral-`0\XINT_expr_unlock #2;}%
+ \romannumeral`&&@\expandafter \XINT_expr_unlock\expandafter#4%
+ \expandafter;\romannumeral`&&@\XINT_expr_unlock #2;}%
\def\XINTinFloatSeqA::csv #1{\expandafter\XINT_flseqa::csv\expandafter
{\romannumeral0\XINTinfloat [\XINTdigits]{#1}}}%
\def\XINT_flseqa::csv #1#2%
@@ -1124,7 +1132,7 @@
\krof #1}%
\def\xintSeqB::csv #1#2%
{\expandafter\XINT_seqb::csv \expandafter{\romannumeral0\xintraw{#2}}{#1}}%
-\def\XINT_seqb::csv #1#2{\expandafter\XINT_seqb::csv_a\romannumeral-`0#2#1!}%
+\def\XINT_seqb::csv #1#2{\expandafter\XINT_seqb::csv_a\romannumeral`&&@#2#1!}%
\def\XINT_seqb::csv_a #1#2;#3;#4!{\expandafter\XINT_expr_seq_empty?
\romannumeral0\csname XINT_seqb::csv_#1\endcsname {#3}{#4}{#2}}%
\def\XINT_seqb::csv_p #1#2#3%
@@ -1143,10 +1151,10 @@
\def\xintiiSeqB::csv #1#2{\XINT_iiseqb::csv #1#2}%
\def\XINT_iiseqb::csv #1#2#3#4%
{\expandafter\XINT_iiseqb::csv_a
- \romannumeral-`0\expandafter \XINT_expr_unlock\expandafter#2%
- \romannumeral-`0\XINT_expr_unlock #4!}%
+ \romannumeral`&&@\expandafter \XINT_expr_unlock\expandafter#2%
+ \romannumeral`&&@\XINT_expr_unlock #4!}%
\def\XINT_iiseqb::csv_a #1#2;#3;#4!{\expandafter\XINT_expr_seq_empty?
- \romannumeral-`0\csname XINT_iiseqb::csv_#1\endcsname {#3}{#4}{#2}}%
+ \romannumeral`&&@\csname XINT_iiseqb::csv_#1\endcsname {#3}{#4}{#2}}%
\def\XINT_iiseqb::csv_p #1#2#3%
{%
\xintSgnFork{\XINT_Cmp {#1}{#2}}{,#1\expandafter\XINT_iiseqb::csv_p\expandafter}%
@@ -1162,9 +1170,9 @@
\def\XINT_iiseqb::csv_z #1#2#3{,#1}%
\def\XINTinFloatSeqB::csv #1#2{\expandafter\XINT_flseqb::csv \expandafter
{\romannumeral0\XINTinfloat [\XINTdigits]{#2}}{#1}}%
-\def\XINT_flseqb::csv #1#2{\expandafter\XINT_flseqb::csv_a\romannumeral-`0#2#1!}%
+\def\XINT_flseqb::csv #1#2{\expandafter\XINT_flseqb::csv_a\romannumeral`&&@#2#1!}%
\def\XINT_flseqb::csv_a #1#2;#3;#4!{\expandafter\XINT_expr_seq_empty?
- \romannumeral-`0\csname XINT_flseqb::csv_#1\endcsname {#3}{#4}{#2}}%
+ \romannumeral`&&@\csname XINT_flseqb::csv_#1\endcsname {#3}{#4}{#2}}%
\def\XINT_flseqb::csv_p #1#2#3%
{%
\xintifCmp {#1}{#2}{,#1\expandafter\XINT_flseqb::csv_p\expandafter}%
@@ -1182,17 +1190,17 @@
{%
\def #1##1% \XINT_expr_op_,
{%
- \expandafter #2\expandafter ##1\romannumeral-`0\XINT_expr_getnext
+ \expandafter #2\expandafter ##1\romannumeral`&&@\XINT_expr_getnext
}%
\def #2##1##2% \XINT_expr_until_,_a
{\xint_UDsignfork
- ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
+ ##2{\expandafter #2\expandafter ##1\romannumeral`&&@#4}%
-{#3##1##2}%
\krof }%
\def #3##1##2##3##4% \XINT_expr_until_,_b
{%
\ifnum ##2>\xint_c_ii
- \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#6_op_##3\endcsname {##4}}%
\else
\xint_afterfi
@@ -1222,17 +1230,17 @@
{%
\def #1% \XINT_expr_op_-<level>
{% get next number+operator then switch to _until macro
- \expandafter #2\romannumeral-`0\XINT_expr_getnext
+ \expandafter #2\romannumeral`&&@\XINT_expr_getnext
}%
\def #2##1% \XINT_expr_until_-<l>_a
{\xint_UDsignfork
- ##1{\expandafter #2\romannumeral-`0#1}%
+ ##1{\expandafter #2\romannumeral`&&@#1}%
-{#3##1}%
\krof }%
\def #3##1##2##3% \XINT_expr_until_-<l>_b
{% _until tests precedence level with next op, executes now or postpones
\ifnum ##1>#4%
- \xint_afterfi {\expandafter #2\romannumeral-`0%
+ \xint_afterfi {\expandafter #2\romannumeral`&&@%
\csname XINT_#5_op_##2\endcsname {##3}}%
\else
\xint_afterfi {\expandafter ##1\expandafter ##2%
@@ -1367,9 +1375,9 @@
\xint_dothis{\csname XINT_expr_onlitteral_##1\endcsname}\fi
\ifcsname XINT_#3_func_##1\endcsname
\xint_dothis{\expandafter\expandafter
- \csname XINT_#3_func_##1\endcsname\romannumeral-`0#2}\fi
+ \csname XINT_#3_func_##1\endcsname\romannumeral`&&@#2}\fi
\xint_orthat{\XINT_expr_unknown_function {##1}%
- \expandafter\XINT_expr_func_unknown\romannumeral-`0#2}%
+ \expandafter\XINT_expr_func_unknown\romannumeral`&&@#2}%
}%
}%
\def\XINT_expr_unknown_function #1{\xintError:removed \xint_gobble_i {#1}}%
@@ -1389,7 +1397,7 @@
\def\XINT_expr_func_unknown #1#2#3%
{\expandafter #1\expandafter #2\csname .=0\endcsname }%
\def\XINT_expr_func_break #1#2#3%
- {\expandafter #1\expandafter #2\csname.=?\romannumeral-`0\XINT_expr_unlock #3\endcsname }%
+ {\expandafter #1\expandafter #2\csname.=?\romannumeral`&&@\XINT_expr_unlock #3\endcsname }%
\let\XINT_flexpr_func_break \XINT_expr_func_break
\let\XINT_iiexpr_func_break \XINT_expr_func_break
\def\XINT_expr_onlitteral_qint #1)%
@@ -1399,7 +1407,7 @@
\def\XINT_expr_onlitteral_qfloat #1)%
{\expandafter\XINT_expr_getop\csname .=\XINTinFloatdigits{#1}\endcsname }%
\def\XINT_expr_onlitteral_seq
- {\expandafter\XINT_expr_onlitteral_seq_f\romannumeral-`0\XINT_expr_onlitteral_seq_a {}}%
+ {\expandafter\XINT_expr_onlitteral_seq_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
\def\XINT_expr_onlitteral_seq_f #1#2{\xint_c_xviii `{seqx}#2)\relax #1}%
\def\XINT_expr_onlitteral_seq_a #1#2,%
{% checks balancing of parentheses
@@ -1440,7 +1448,7 @@
{% #3 is the Latin letter serving as dummy variable, #4 is the expression to evaluate
\expandafter \XINT_expr_getop
\csname .=\expandafter\XINT_expr_seq:_aa
- \romannumeral-`0\XINT_expr_unlock #2!{#1#4\relax !#3},^,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #2!{#1#4\relax !#3},^,\endcsname
}%
\def\XINT_expr_seq:_aa #1{\if +#1\expandafter\XINT_expr_seq:_A\else
\expandafter\XINT_expr_seq:_a\fi #1}%
@@ -1451,7 +1459,7 @@
\if ^#1\xint_dothis\XINT_expr_seq:_end\fi
\xint_orthat\XINT_expr_seq:_d #1}%
\def\XINT_expr_seq:_d #1,#2{\expandafter\XINT_expr_seq:_e
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}%
\def\XINT_expr_seq:_e #1{\if #1^\xint_dothis\XINT_expr_seq:_abort\fi
\if #1?\xint_dothis\XINT_expr_seq:_break\fi
\if #1!\xint_dothis\XINT_expr_seq:_omit\fi
@@ -1468,7 +1476,7 @@
\def\XINT_expr_seq:_A +#1!#2,^,%
{\expandafter\XINT_expr_seq_empty?\romannumeral0\XINT_expr_seq:_D {#1}{#2}}%
\def\XINT_expr_seq:_D #1#2{\expandafter\XINT_expr_seq:_E
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}%
\def\XINT_expr_seq:_E #1{\if #1^\xint_dothis\XINT_expr_seq:_Abort\fi
\if #1?\xint_dothis\XINT_expr_seq:_Break\fi
\if #1!\xint_dothis\XINT_expr_seq:_Omit\fi
@@ -1480,10 +1488,10 @@
\def\XINT_expr_seq:_Abort #1!#2#3#4{}%
\def\XINT_expr_seq:_Break #1!#2#3#4{,#1}%
\def\XINT_expr_onlitteral_add
- {\expandafter\XINT_expr_onlitteral_add_f\romannumeral-`0\XINT_expr_onlitteral_seq_a {}}%
+ {\expandafter\XINT_expr_onlitteral_add_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
\def\XINT_expr_onlitteral_add_f #1#2{\xint_c_xviii `{opx}#2)\relax #1+}%
\def\XINT_expr_onlitteral_mul
- {\expandafter\XINT_expr_onlitteral_mul_f\romannumeral-`0\XINT_expr_onlitteral_seq_a {}}%
+ {\expandafter\XINT_expr_onlitteral_mul_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
\def\XINT_expr_onlitteral_mul_f #1#2{\xint_c_xviii `{opx}#2)\relax #1*}%
\expandafter\edef\csname XINT_expr_op:_+\endcsname
{\noexpand\xint_gobble_v {}{}{}\expandafter\noexpand\csname .=0\endcsname}%
@@ -1496,7 +1504,7 @@
{%
\expandafter\XINT_expr_getop\romannumeral0\expandafter\XINT_expr_op:_a
\csname XINT_expr_op:_#5\expandafter\endcsname
- \romannumeral-`0\XINT_expr_unlock #2!#5#1#3{#4}%
+ \romannumeral`&&@\XINT_expr_unlock #2!#5#1#3{#4}%
}%
\def\XINT_expr_op:_a #1#2!#3#4#5#6{\XINT_expr_op:_b {#1#4#3{#6\relax\relax !#5}}#2,^,}%
\def\XINT_expr_op:_b #1#2,{\XINT_expr_op:_c #2,#1}%
@@ -1510,7 +1518,7 @@
\def\XINT_expr_op:_end ^,#1#2#3#4{\expandafter\expandafter\expandafter\space
\expandafter\xint_gobble_iv #1}%
\def\XINT_expr_onlitteral_subs
- {\expandafter\XINT_expr_onlitteral_subs_f\romannumeral-`0\XINT_expr_onlitteral_seq_a {}}%
+ {\expandafter\XINT_expr_onlitteral_subs_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
\def\XINT_expr_onlitteral_subs_f #1#2{\xint_c_xviii `{subx}#2)\relax #1}%
\def\XINT_expr_func_subx #1#2{\XINT_allexpr_subx \xintbareeval }%
\def\XINT_flexpr_func_subx #1#2{\XINT_allexpr_subx \xintbarefloateval}%
@@ -1519,7 +1527,7 @@
{% #3 is the dummy variable, #4 is the expression to evaluate
\expandafter \XINT_expr_getop
\csname .=\expandafter\XINT_expr_subx:_a
- \romannumeral-`0\XINT_expr_unlock #2!{#1#4\relax !#3}\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #2!{#1#4\relax !#3}\endcsname
}%
\def\XINT_expr_subx:_a #1!#2%
{\expandafter\XINT_expr_subx:_end \romannumeral0#2{#1}}%
@@ -1530,7 +1538,7 @@
\def\XINT_allexpr_rseq #1#2%
{%
\expandafter\XINT_expr_rseqx\expandafter #1\expandafter
- #2\romannumeral-`0\XINT_expr_onlitteral_seq_a {}%
+ #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
}%
\def\XINT_expr_rseqx #1#2#3#4%
{%
@@ -1542,7 +1550,7 @@
\expandafter \XINT_expr_getop
\csname .=\XINT_expr_unlock #2%
\expandafter\XINT_expr_rseq:_aa
- \romannumeral-`0\XINT_expr_unlock #1!{#5#4\relax !#3}#2,^,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #1!{#5#4\relax !#3}#2,^,\endcsname
}%
\def\XINT_expr_rseq:_aa #1{\if +#1\expandafter\XINT_expr_rseq:_A\else
\expandafter\XINT_expr_rseq:_a\fi #1}%
@@ -1552,7 +1560,7 @@
\if ^#1\xint_dothis\XINT_expr_rseq:_end\fi
\xint_orthat\XINT_expr_rseq:_d #1}%
\def\XINT_expr_rseq:_d #1,~#2#3{\expandafter\XINT_expr_rseq:_e
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}%
\def\XINT_expr_rseq:_e #1{%
\if ^#1\xint_dothis\XINT_expr_rseq:_abort\fi
\if ?#1\xint_dothis\XINT_expr_rseq:_break\fi
@@ -1567,7 +1575,7 @@
\def\XINT_expr_rseq:_end ^,~#1#2{}% no nil for rseq
\def\XINT_expr_rseq:_A +#1!#2#3,^,{\XINT_expr_rseq:_D {#1}#3{#2}}%
\def\XINT_expr_rseq:_D #1#2#3{\expandafter\XINT_expr_rseq:_E
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}%
\def\XINT_expr_rseq:_E #1{\if #1^\xint_dothis\XINT_expr_rseq:_Abort\fi
\if #1?\xint_dothis\XINT_expr_rseq:_Break\fi
\if #1!\xint_dothis\XINT_expr_rseq:_Omit\fi
@@ -1585,7 +1593,7 @@
\def\XINT_allexpr_rrseq #1#2%
{%
\expandafter\XINT_expr_rrseqx\expandafter #1\expandafter
- #2\romannumeral-`0\XINT_expr_onlitteral_seq_a {}%
+ #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
}%
\def\XINT_expr_rrseqx #1#2#3#4%
{%
@@ -1599,7 +1607,7 @@
\expandafter \XINT_expr_getop
\csname .=\XINT_expr_unlock #3%
\expandafter\XINT_expr_rrseq:_aa
- \romannumeral-`0\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname
}%
\def\XINT_expr_rrseq:_aa #1{\if +#1\expandafter\XINT_expr_rrseq:_A\else
\expandafter\XINT_expr_rrseq:_a\fi #1}%
@@ -1610,7 +1618,7 @@
\if ^#1\xint_dothis\XINT_expr_rrseq:_end\fi
\xint_orthat\XINT_expr_rrseq:_d #1}%
\def\XINT_expr_rrseq:_d #1,~#2?#3{\expandafter\XINT_expr_rrseq:_e
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
\def\XINT_expr_rrseq:_goon #1!#2#3~#4?#5{,#1\expandafter\XINT_expr_rrseq:_b\expandafter
{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}%
\def\XINT_expr_rrseq:_omit #1!#2#3~{\XINT_expr_rrseq:_b }%
@@ -1628,7 +1636,7 @@
\catcode`? 3
\def\XINT_expr_rrseq:_A +#1!#2#3,^,{\XINT_expr_rrseq:_D {#1}{#3}{#2}}%
\def\XINT_expr_rrseq:_D #1#2#3{\expandafter\XINT_expr_rrseq:_E
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
\def\XINT_expr_rrseq:_Goon #1!#2#3~#4?#5%
{,#1\expandafter\XINT_expr_rrseq:_D\expandafter{\the\numexpr #3+\xint_c_i\expandafter}%
\expandafter{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}%
@@ -1647,7 +1655,7 @@
\def\XINT_allexpr_iter #1#2%
{%
\expandafter\XINT_expr_iterx\expandafter #1\expandafter
- #2\romannumeral-`0\XINT_expr_onlitteral_seq_a {}%
+ #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
}%
\def\XINT_expr_iterx #1#2#3#4%
{%
@@ -1661,7 +1669,7 @@
\expandafter \XINT_expr_getop
\csname .=%
\expandafter\XINT_expr_iter:_aa
- \romannumeral-`0\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname
}%
\def\XINT_expr_iter:_aa #1{\if +#1\expandafter\XINT_expr_iter:_A\else
\expandafter\XINT_expr_iter:_a\fi #1}%
@@ -1672,7 +1680,7 @@
\if ^#1\xint_dothis\XINT_expr_iter:_end\fi
\xint_orthat\XINT_expr_iter:_d #1}%
\def\XINT_expr_iter:_d #1,~#2?#3{\expandafter\XINT_expr_iter:_e
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
\def\XINT_expr_iter:_goon #1!#2#3~#4?#5{\expandafter\XINT_expr_iter:_b\expandafter
{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}%
\def\XINT_expr_iter:_omit #1!#2#3~{\XINT_expr_iter:_b }%
@@ -1697,7 +1705,7 @@
\catcode`? 3
\def\XINT_expr_iter:_A +#1!#2#3,^,{\XINT_expr_iter:_D {#1}{#3}{#2}}%
\def\XINT_expr_iter:_D #1#2#3{\expandafter\XINT_expr_iter:_E
- \romannumeral-`0\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
+ \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}%
\def\XINT_expr_iter:_Goon #1!#2#3~#4?#5%
{\expandafter\XINT_expr_iter:_D\expandafter{\the\numexpr #3+\xint_c_i\expandafter}%
\expandafter{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}%
@@ -1714,19 +1722,19 @@
\if #1?\xint_dothis\XINT_expr_iter:_Break\fi
\if #1!\xint_dothis\XINT_expr_iter:_Omit\fi
\xint_orthat{\XINT_expr_iter:_Goon #1}}%
-\def\xintANDof:csv #1{\expandafter\XINT_andof:_a\romannumeral-`0#1,,^}%
+\def\xintANDof:csv #1{\expandafter\XINT_andof:_a\romannumeral`&&@#1,,^}%
\def\XINT_andof:_a #1{\if ,#1\expandafter\XINT_andof:_e
\else\expandafter\XINT_andof:_c\fi #1}%
\def\XINT_andof:_c #1,{\xintiiifNotZero {#1}{\XINT_andof:_a}{\XINT_andof:_no}}%
\def\XINT_andof:_no #1^{0}%
\def\XINT_andof:_e #1^{1}% works with empty list
-\def\xintORof:csv #1{\expandafter\XINT_orof:_a\romannumeral-`0#1,,^}%
+\def\xintORof:csv #1{\expandafter\XINT_orof:_a\romannumeral`&&@#1,,^}%
\def\XINT_orof:_a #1{\if ,#1\expandafter\XINT_orof:_e
\else\expandafter\XINT_orof:_c\fi #1}%
\def\XINT_orof:_c #1,{\xintiiifNotZero{#1}{\XINT_orof:_yes}{\XINT_orof:_a}}%
\def\XINT_orof:_yes #1^{1}%
\def\XINT_orof:_e #1^{0}% works with empty list
-\def\xintXORof:csv #1{\expandafter\XINT_xorof:_a\expandafter 0\romannumeral-`0#1,,^}%
+\def\xintXORof:csv #1{\expandafter\XINT_xorof:_a\expandafter 0\romannumeral`&&@#1,,^}%
\def\XINT_xorof:_a #1#2,{\XINT_xorof:_b #2,#1}%
\def\XINT_xorof:_b #1{\if ,#1\expandafter\XINT_xorof:_e
\else\expandafter\XINT_xorof:_c\fi #1}%
@@ -1741,46 +1749,46 @@
\def\XINT_oncsv:_a #1#2#3%
{\if ,#3\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_oncsv:_b\fi #1#2#3}%
\def\XINT_oncsv:_b #1#2#3,%
- {\expandafter\XINT_oncsv:_c \expandafter{\romannumeral-`0#2{#3}}#1#2}%
-\def\XINT_oncsv:_c #1#2#3#4,{\expandafter\XINT_oncsv:_d \romannumeral-`0#4,{#1}#2#3}%
+ {\expandafter\XINT_oncsv:_c \expandafter{\romannumeral`&&@#2{#3}}#1#2}%
+\def\XINT_oncsv:_c #1#2#3#4,{\expandafter\XINT_oncsv:_d \romannumeral`&&@#4,{#1}#2#3}%
\def\XINT_oncsv:_d #1%
{\if ^#1\expandafter\XINT_oncsv:_end\else\expandafter\XINT_oncsv:_e\fi #1}%
\def\XINT_oncsv:_e #1,#2#3#4%
- {\expandafter\XINT_oncsv:_c\expandafter {\romannumeral-`0#3{#4{#1}}{#2}}#3#4}%
+ {\expandafter\XINT_oncsv:_c\expandafter {\romannumeral`&&@#3{#4{#1}}{#2}}#3#4}%
\def\xintMaxof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmax
- \expandafter\xint_firstofone\romannumeral-`0#1,^,{0/1[0]}}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,{0/1[0]}}%
\def\xintiiMaxof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiimax
- \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
\def\xintMinof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmin
- \expandafter\xint_firstofone\romannumeral-`0#1,^,{0/1[0]}}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,{0/1[0]}}%
\def\xintiiMinof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiimin
- \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
\def\xintSum:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintadd
- \expandafter\xint_firstofone\romannumeral-`0#1,^,{0/1[0]}}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,{0/1[0]}}%
\def\xintiiSum:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiiadd
- \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
\def\xintPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmul
- \expandafter\xint_firstofone\romannumeral-`0#1,^,{1/1[0]}}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,{1/1[0]}}%
\def\xintiiPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiimul
- \expandafter\xint_firstofone\romannumeral-`0#1,^,1}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
\def\xintGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintgcd
- \expandafter\xint_firstofone\romannumeral-`0#1,^,1}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
\def\xintLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintlcm
- \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
\def\xintiiGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiigcd
- \expandafter\xint_firstofone\romannumeral-`0#1,^,1}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
\def\xintiiLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiilcm
- \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+ \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
\def\XINTinFloatdigits {\XINTinFloat [\XINTdigits]}%
\def\XINTinFloatSqrtdigits {\XINTinFloatSqrt [\XINTdigits]}%
\def\XINTinFloatMaxof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmax
- \expandafter\XINTinFloatdigits\romannumeral-`0#1,^,{0[0]}}%
+ \expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{0[0]}}%
\def\XINTinFloatMinof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmin
- \expandafter\XINTinFloatdigits\romannumeral-`0#1,^,{0[0]}}%
+ \expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{0[0]}}%
\def\XINTinFloatSum:csv #1{\expandafter\XINT_oncsv:_a\expandafter\XINTinfloatadd
- \expandafter\XINTinFloatdigits\romannumeral-`0#1,^,{0[0]}}%
+ \expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{0[0]}}%
\def\XINTinFloatPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\XINTinfloatmul
- \expandafter\XINTinFloatdigits\romannumeral-`0#1,^,{1[0]}}%
+ \expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{1[0]}}%
\def\XINT_expr_twoargs #1,#2,{{#1}{#2}}%
\def\XINT_expr_argandopt #1,#2,#3.#4#5%
{%
@@ -1846,7 +1854,7 @@
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_expr_argandopt
- \romannumeral-`0\XINT_expr_unlock#3,,.\XINTinFloatSqrtdigits\XINTinFloatSqrt
+ \romannumeral`&&@\XINT_expr_unlock#3,,.\XINTinFloatSqrtdigits\XINTinFloatSqrt
\endcsname
}%
\let\XINT_flexpr_func_sqrt\XINT_expr_func_sqrt
@@ -1859,34 +1867,34 @@
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_expr_oneortwo
\expandafter\xintiRound\expandafter\xintRound
- \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
}%
\let\XINT_flexpr_func_round\XINT_expr_func_round
\def\XINT_iiexpr_func_round #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_iiexpr_oneortwo\expandafter\xintiRound
- \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
}%
\def\XINT_expr_func_trunc #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_expr_oneortwo
\expandafter\xintiTrunc\expandafter\xintTrunc
- \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
}%
\let\XINT_flexpr_func_trunc\XINT_expr_func_trunc
\def\XINT_iiexpr_func_trunc #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_iiexpr_oneortwo\expandafter\xintiTrunc
- \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
}%
\def\XINT_expr_func_float #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINT_expr_argandopt
- \romannumeral-`0\XINT_expr_unlock #3,,.\XINTinFloatdigits\XINTinFloat
+ \romannumeral`&&@\XINT_expr_unlock #3,,.\XINTinFloatdigits\XINTinFloat
\endcsname
}%
\let\XINT_flexpr_func_float\XINT_expr_func_float
@@ -1895,28 +1903,28 @@
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintMod
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_flexpr_func_mod #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\XINTinFloatMod
- \romannumeral-`0\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\expandafter\XINT_expr_twoargs
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_iiexpr_func_mod #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintiiMod
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_expr_func_quo #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintiQuo
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\let\XINT_flexpr_func_quo\XINT_expr_func_quo
\def\XINT_iiexpr_func_quo #1#2#3%
@@ -1924,14 +1932,14 @@
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintiiQuo
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_expr_func_rem #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintiRem
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\let\XINT_flexpr_func_rem\XINT_expr_func_rem
\def\XINT_iiexpr_func_rem #1#2#3%
@@ -1939,7 +1947,7 @@
\expandafter #1\expandafter #2\csname .=%
\expandafter\expandafter\expandafter\xintiiRem
\expandafter\XINT_expr_twoargs
- \romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_expr_func_gcd #1#2#3%
{\expandafter #1\expandafter #2\csname
@@ -2022,26 +2030,26 @@
\def\xintifNotZero: #1,#2,#3,{\xintiiifNotZero{#1}{#2}{#3}}%
\def\XINT_expr_func_if #1#2#3%
{\expandafter #1\expandafter #2\csname
- .=\expandafter\xintifNotZero:\romannumeral-`0\XINT_expr_unlock #3,\endcsname }%
+ .=\expandafter\xintifNotZero:\romannumeral`&&@\XINT_expr_unlock #3,\endcsname }%
\let\XINT_flexpr_func_if\XINT_expr_func_if
\let\XINT_iiexpr_func_if\XINT_expr_func_if
\def\xintifSgn: #1,#2,#3,#4,{\xintiiifSgn{#1}{#2}{#3}{#4}}%
\def\XINT_expr_func_ifsgn #1#2#3%
{%
\expandafter #1\expandafter #2\csname
- .=\expandafter\xintifSgn:\romannumeral-`0\XINT_expr_unlock #3,\endcsname
+ .=\expandafter\xintifSgn:\romannumeral`&&@\XINT_expr_unlock #3,\endcsname
}%
\let\XINT_flexpr_func_ifsgn\XINT_expr_func_ifsgn
\let\XINT_iiexpr_func_ifsgn\XINT_expr_func_ifsgn
\def\XINT_expr_func_first #1#2#3%
{\expandafter #1\expandafter #2\csname.=\expandafter\XINT_expr_func_firsta
- \romannumeral-`0\XINT_expr_unlock #3,^\endcsname }%
+ \romannumeral`&&@\XINT_expr_unlock #3,^\endcsname }%
\def\XINT_expr_func_firsta #1,#2^{#1}%
\let\XINT_flexpr_func_first\XINT_expr_func_first
\let\XINT_iiexpr_func_first\XINT_expr_func_first
\def\XINT_expr_func_last #1#2#3% will not work in \xintNewExpr if macro param involved
{\expandafter #1\expandafter #2\csname.=\expandafter\XINT_expr_func_lasta
- \romannumeral-`0\XINT_expr_unlock #3,^\endcsname }%
+ \romannumeral`&&@\XINT_expr_unlock #3,^\endcsname }%
\def\XINT_expr_func_lasta #1,#2%
{\if ^#2 #1\expandafter\xint_gobble_ii\fi \XINT_expr_func_lasta #2}%
\let\XINT_flexpr_func_last\XINT_expr_func_last
@@ -2069,9 +2077,9 @@
{\xintListWithSep,{\xintRevWithBraces {\xintCSVtoListNonStripped{#1}}}}%
\def\xintSeqB:f:csv #1#2%
{\expandafter\XINT_seqb:f:csv \expandafter{\romannumeral0\xintraw{#2}}{#1}}%
-\def\XINT_seqb:f:csv #1#2{\expandafter\XINT_seqb:f:csv_a\romannumeral-`0#2#1!}%
+\def\XINT_seqb:f:csv #1#2{\expandafter\XINT_seqb:f:csv_a\romannumeral`&&@#2#1!}%
\def\XINT_seqb:f:csv_a #1#2;#3;#4!{%
- \expandafter\xint_gobble_i\romannumeral-`0%
+ \expandafter\xint_gobble_i\romannumeral`&&@%
\xintifCmp {#3}{#4}\XINT_seqb:f:csv_bl\XINT_seqb:f:csv_be\XINT_seqb:f:csv_bg
#1{#3}{#4}{}{#2}}%
\def\XINT_seqb:f:csv_be #1#2#3#4#5{,#2}%
@@ -2098,10 +2106,10 @@
\def\XINT_seqb:f:csv_nb #1#2#3#4{#3,#1}%
\def\XINT_seqb:f:csv_nc #1#2#3#4{#3}%
\def\xintiiSeqb:f:csv #1#2%
- {\expandafter\XINT_iiseqb:f:csv \expandafter{\romannumeral-`0#2}{#1}}%
-\def\XINT_iiseqb:f:csv #1#2{\expandafter\XINT_iiseqb:f:csv_a\romannumeral-`0#2#1!}%
+ {\expandafter\XINT_iiseqb:f:csv \expandafter{\romannumeral`&&@#2}{#1}}%
+\def\XINT_iiseqb:f:csv #1#2{\expandafter\XINT_iiseqb:f:csv_a\romannumeral`&&@#2#1!}%
\def\XINT_iiseqb:f:csv_a #1#2;#3;#4!{%
- \expandafter\xint_gobble_i\romannumeral-`0%
+ \expandafter\xint_gobble_i\romannumeral`&&@%
\xintSgnFork{\XINT_Cmp {#3}{#4}}%
\XINT_iiseqb:f:csv_bl\XINT_seqb:f:csv_be\XINT_iiseqb:f:csv_bg
#1{#3}{#4}{}{#2}}%
@@ -2127,9 +2135,9 @@
}%
\def\XINTinFloatSeqB:f:csv #1#2{\expandafter\XINT_flseqb:f:csv \expandafter
{\romannumeral0\XINTinfloat [\XINTdigits]{#2}}{#1}}%
-\def\XINT_flseqb:f:csv #1#2{\expandafter\XINT_flseqb:f:csv_a\romannumeral-`0#2#1!}%
+\def\XINT_flseqb:f:csv #1#2{\expandafter\XINT_flseqb:f:csv_a\romannumeral`&&@#2#1!}%
\def\XINT_flseqb:f:csv_a #1#2;#3;#4!{%
- \expandafter\xint_gobble_i\romannumeral-`0%
+ \expandafter\xint_gobble_i\romannumeral`&&@%
\xintifCmp {#3}{#4}\XINT_flseqb:f:csv_bl\XINT_seqb:f:csv_be\XINT_flseqb:f:csv_bg
#1{#3}{#4}{}{#2}}%
\def\XINT_flseqb:f:csv_bl #1{\if #1p\expandafter\XINT_flseqb:f:csv_pa\else
@@ -2153,24 +2161,24 @@
\XINT_seqb:f:csv_nc\XINT_seqb:f:csv_nb\XINT_flseqb:f:csv_na {#1}{#2}%
}%
\def\xintApply::csv #1#2%
- {\expandafter\XINT_applyon::_a\expandafter {\romannumeral-`0#2}{#1}}%
+ {\expandafter\XINT_applyon::_a\expandafter {\romannumeral`&&@#2}{#1}}%
\def\XINT_applyon::_a #1#2{\XINT_applyon::_b {#2}{}#1,,}%
-\def\XINT_applyon::_b #1#2#3,{\expandafter\XINT_applyon::_c \romannumeral-`0#3,{#1}{#2}}%
+\def\XINT_applyon::_b #1#2#3,{\expandafter\XINT_applyon::_c \romannumeral`&&@#3,{#1}{#2}}%
\def\XINT_applyon::_c #1{\if #1,\expandafter\XINT_applyon::_end
\else\expandafter\XINT_applyon::_d\fi #1}%
-\def\XINT_applyon::_d #1,#2{\expandafter\XINT_applyon::_e\romannumeral-`0#2{#1},{#2}}%
+\def\XINT_applyon::_d #1,#2{\expandafter\XINT_applyon::_e\romannumeral`&&@#2{#1},{#2}}%
\def\XINT_applyon::_e #1,#2#3{\XINT_applyon::_b {#2}{#3, #1}}%
\def\XINT_applyon::_end #1,#2#3{\xint_secondoftwo #3}%
\def\xintApply:::csv #1#2#3%
- {\expandafter\XINT_applyon:::_a\expandafter{\romannumeral-`0#2}{#1}{#3}}%
+ {\expandafter\XINT_applyon:::_a\expandafter{\romannumeral`&&@#2}{#1}{#3}}%
\def\XINT_applyon:::_a #1#2#3{\XINT_applyon:::_b {#2}{#3}{}#1,,}%
\def\XINT_applyon:::_b #1#2#3#4,%
- {\expandafter\XINT_applyon:::_c \romannumeral-`0#4,{#1}{#2}{#3}}%
+ {\expandafter\XINT_applyon:::_c \romannumeral`&&@#4,{#1}{#2}{#3}}%
\def\XINT_applyon:::_c #1{\if #1,\expandafter\XINT_applyon:::_end
\else\expandafter\XINT_applyon:::_d\fi #1}%
\def\XINT_applyon:::_d #1,#2#3%
{\expandafter\XINT_applyon:::_e\expandafter
- {\romannumeral-`0\xintApply::csv {#2{#1}}{#3}},{#2}{#3}}%
+ {\romannumeral`&&@\xintApply::csv {#2{#1}}{#3}},{#2}{#3}}%
\def\XINT_applyon:::_e #1,#2#3#4{\XINT_applyon:::_b {#2}{#3}{#4, #1}}%
\def\XINT_applyon:::_end #1,#2#3#4{\xint_secondoftwo #4}%
\def\XINT_expr_RApply::csv #1#2#3#4%
@@ -2180,7 +2188,7 @@
\catcode`~ 12 % by the way, catcode is set to 3 in \XINTsetupcatcodes
\catcode`$ 12 % $
\def\XINT_xptwo_getab_b #1#2!#3%
- {\expandafter\XINT_xptwo_getab_c\romannumeral-`0#3!#1{#1#2}}%
+ {\expandafter\XINT_xptwo_getab_c\romannumeral`&&@#3!#1{#1#2}}%
\def\XINT_xptwo_getab_c #1#2!#3#4#5#6{#1#3{#5}{#6}{#1#2}{#4}}%
\def\xint_ddfork #1$$#2#3\krof {#2}% $$
\def\XINT_NEfork #1#2{\xint_ddfork
@@ -2211,8 +2219,8 @@
\expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
\endcsname\expandafter\def\csname xint#1\endcsname ####1####2{%
\expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0####2!{####1}{~xint#1}{xint#1}}%
+ \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
+ \romannumeral`&&@####2!{####1}{~xint#1}{xint#1}}%
}%
}% cela aurait-il un sens d'ajouter Raw et iNum (à cause de qint, qfrac,
% qfloat?). Pas le temps d'y réfléchir. Je ne fais rien.
@@ -2223,7 +2231,7 @@
\expandafter{\the\toks0%
\expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
\endcsname\expandafter\def\csname xint#1\endcsname ####1{%
- \expandafter\XINT_NEfork_one\romannumeral-`0####1!{~xint#1}{xint#1}{}{}}%
+ \expandafter\XINT_NEfork_one\romannumeral`&&@####1!{~xint#1}{xint#1}{}{}}%
}%
}%
\toks0
@@ -2231,7 +2239,7 @@
\let\XINTinFloatFacNE\XINTinFloatFac
\def\XINTinFloatFac ##1{%
\expandafter\XINT_NEfork_one
- \romannumeral-`0##1!{~XINTinFloatFac}{XINTinFloatFac}{}{}}%
+ \romannumeral`&&@##1!{~XINTinFloatFac}{XINTinFloatFac}{}{}}%
}%
\xintFor #1 in {Add,Sub,Mul,Div,Power,E,Mod,SeqA::csv}\do
{\toks0
@@ -2240,8 +2248,8 @@
\csname XINTinFloat#1\expandafter\endcsname
\expandafter\def\csname XINTinFloat#1\endcsname ####1####2{%
\expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0####2!{####1}{~XINTinFloat#1}{XINTinFloat#1}}%
+ \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
+ \romannumeral`&&@####2!{####1}{~XINTinFloat#1}{XINTinFloat#1}}%
}%
}%
\xintFor #1 in {XINTinFloatdigits,XINTinFloatFracdigits,XINTinFloatSqrtdigits}\do
@@ -2249,7 +2257,7 @@
\expandafter{\the\toks0%
\expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
\endcsname\expandafter\def\csname #1\endcsname ####1{\expandafter
- \XINT_NEfork_one\romannumeral-`0####1!{~#1}{#1}{}{}}%
+ \XINT_NEfork_one\romannumeral`&&@####1!{~#1}{#1}{}{}}%
}%
}%
\xintFor #1 in {xintSeq::csv,xintiiSeq::csv,XINTinFloatSeq::csv}\do
@@ -2258,8 +2266,8 @@
\expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
\endcsname\expandafter\def\csname #1\endcsname ####1####2{%
\expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0####2!{####1}{$noexpand$#1}{#1}}%
+ \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
+ \romannumeral`&&@####2!{####1}{$noexpand$#1}{#1}}%
}%
}%
\xintFor #1 in {xintSeqB,xintiiSeqB,XINTinFloatSeqB}\do
@@ -2268,8 +2276,8 @@
\expandafter\let\csname #1::csvNE\expandafter\endcsname\csname #1::csv\expandafter
\endcsname\expandafter\def\csname #1::csv\endcsname ####1####2{%
\expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0####2!{####1}{$noexpand$#1:f:csv}{#1::csv}}%
+ \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
+ \romannumeral`&&@####2!{####1}{$noexpand$#1:f:csv}{#1::csv}}%
}%
}%
\toks0
@@ -2277,11 +2285,11 @@
\let\XINTinFloatNE\XINTinFloat
\def\XINTinFloat [##1]##2{% not ultimately general, but got tired
\expandafter\XINT_NEfork_one
- \romannumeral-`0##2!{~XINTinFloat[##1]}{XINTinFloat}{}{[##1]}}%
+ \romannumeral`&&@##2!{~XINTinFloat[##1]}{XINTinFloat}{}{[##1]}}%
\let\XINTinFloatSqrtNE\XINTinFloatSqrt
\def\XINTinFloatSqrt [##1]##2{%
\expandafter\XINT_NEfork_one
- \romannumeral-`0##2!{~XINTinFloatSqrt[##1]}{XINTinFloatSqrt}{}{[##1]}}%
+ \romannumeral`&&@##2!{~XINTinFloatSqrt[##1]}{XINTinFloatSqrt}{}{[##1]}}%
}%
\xintFor #1 in {ANDof,ORof,XORof,iiMaxof,iiMinof,iiSum,iiPrd,
GCDof,LCMof,Sum,Prd,Maxof,Minof}\do
@@ -2301,11 +2309,11 @@
\def\XINT_expr_unlock_sp ##1.;##2##3.=##4!{\if -##2\expandafter\xint_firstoftwo
\else\expandafter\xint_secondoftwo\fi \XINTdigits{{##2##3}}{##4}}%
\def\XINT_expr_print ##1{\expandafter\xintSPRaw::csv\expandafter
- {\romannumeral-`0\XINT_expr_unlock ##1}}%
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
\def\XINT_iiexpr_print ##1{\expandafter\xintCSV::csv\expandafter
- {\romannumeral-`0\XINT_expr_unlock ##1}}%
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
\def\XINT_boolexpr_print ##1{\expandafter\xintIsTrue::csv\expandafter
- {\romannumeral-`0\XINT_expr_unlock ##1}}%
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
\def\xintCSV::csv {~xintCSV::csv }% spaces to separate from possible catcode 11
\def\xintSPRaw::csv {~xintSPRaw::csv }% stuff after
\def\xintPFloat::csv {~xintPFloat::csv }%
@@ -2320,7 +2328,7 @@
\def\xintNewIExpr {\xint_NewExpr\xinttheiexpr }%
\def\xintNewIIExpr {\xint_NewExpr\xinttheiiexpr }%
\def\xintNewBoolExpr {\xint_NewExpr\xinttheboolexpr }%
-\def\XINT_newexpr_finish #1>{\noexpand\romannumeral-`0}%
+\def\XINT_newexpr_finish #1>{\noexpand\romannumeral`&&@}%
\def\xint_NewExpr #1#2[#3]%
{%
\begingroup
@@ -2350,7 +2358,7 @@
\endlinechar -1 \everyeof {\noexpand }@
\edef\XINT_tmpb
{\scantokens\expandafter
- {\romannumeral-`0\expandafter%1\XINT_tmpa {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@
+ {\romannumeral`&&@\expandafter%1\XINT_tmpa {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@
}@
\escapechar 92 \catcode`# 6 \catcode`$ 0 @ $
\the\toks0