%%
%% This is file `xintexpr.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xint.dtx  (with options: `xintexpr')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from xintexpr.sty.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file xint.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%----------------------------------------------------------------
%% The xint bundle (version 1.09m of February 26, 2014)
%% xintexpr: Expandable expression parser
%% Copyright (C) 2013-2014 by Jean-Francois Burnol
%%----------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
  \catcode13=5    % ^^M
  \endlinechar=13 %
  \catcode123=1   % {
  \catcode125=2   % }
  \catcode64=11   % @
  \catcode35=6    % #
  \catcode44=12   % ,
  \catcode45=12   % -
  \catcode46=12   % .
  \catcode58=12   % :
  \def\space { }%
  \let\z\endgroup
  \expandafter\let\expandafter\x\csname ver@xintexpr.sty\endcsname
  \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname
  \expandafter
    \ifx\csname PackageInfo\endcsname\relax
      \def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}%
    \else
      \def\y#1#2{\PackageInfo{#1}{#2}}%
    \fi
  \expandafter
  \ifx\csname numexpr\endcsname\relax
     \y{xintexpr}{\numexpr not available, aborting input}%
     \aftergroup\endinput
  \else
    \ifx\x\relax   % plain-TeX, first loading of xintexpr.sty
      \ifx\w\relax % but xintfrac.sty not yet loaded.
         \y{xintexpr}{now issuing \string\input\space xintfrac.sty}%
         \def\z{\endgroup\input xintfrac.sty\relax}%
      \fi
    \else
      \def\empty {}%
      \ifx\x\empty % LaTeX, first loading,
      % variable is initialized, but \ProvidesPackage not yet seen
          \ifx\w\relax % xintfrac.sty not yet loaded.
            \y{xintexpr}{now issuing \string\RequirePackage{xintfrac}}%
            \def\z{\endgroup\RequirePackage{xintfrac}}%
          \fi
      \else
        \y{xintexpr}{I was already loaded, aborting input}%
        \aftergroup\endinput
      \fi
    \fi
  \fi
\z%
\begingroup\catcode61\catcode48\catcode32=10\relax%
  \catcode13=5    % ^^M
  \endlinechar=13 %
  \catcode123=1   % {
  \catcode125=2   % }
  \catcode64=11   % @
  \catcode35=6    % #
  \catcode44=12   % ,
  \catcode45=12   % -
  \catcode46=12   % .
  \catcode58=12   % :
  \ifdefined\PackageInfo
      \def\y#1#2{\PackageInfo{#1}{#2}}%
    \else
      \def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}%
  \fi
  \def\empty {}%
  \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname
  \ifx\w\relax % Plain TeX, user gave a file name at the prompt
      \y{xintexpr}{Loading of package xintfrac failed, aborting input}%
      \aftergroup\endinput
  \fi
  \ifx\w\empty % LaTeX, user gave a file name at the prompt
      \y{xintexpr}{Loading of package xintfrac failed, aborting input}%
      \aftergroup\endinput
  \fi
\endgroup%
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
  [2014/02/26 v1.09m Expandable expression parser (jfB)]%
\def\xint_gob_til_! #1!{}% nota bene: this ! has catcode 11
\expandafter\def\expandafter
\XINT_expr_lock\expandafter#\expandafter1\expandafter !\expandafter
    {\expandafter\expandafter\space\csname .=#1\endcsname }%
\def\XINT_expr_unlock  {\expandafter\XINT_expr_unlock_a\string }%
\def\XINT_expr_unlock_a #1.={}%
\def\XINT_expr_unexpectedtoken {\xintError:ignored }%
\def\XINT_newexpr_setprefix #1>{\noexpand\romannumeral-`0}%
\def\xint_UDxintrelaxfork #1\xint_relax #2#3\krof {#2}%
\def\xint_protect {\noexpand\xint_protect\noexpand }% 1.09j
\def\XINT_expr_done     {!\XINT_expr_usethe\xint_protect\XINT_expr_print }%
\let\XINT_iiexpr_done   \XINT_expr_done
\def\XINT_iexpr_done    {!\XINT_expr_usethe\xint_protect\XINT_iexpr_print }%
\def\XINT_flexpr_done   {!\XINT_expr_usethe\xint_protect\XINT_flexpr_print }%
\def\XINT_boolexpr_done {!\XINT_expr_usethe\xint_protect\XINT_boolexpr_print }%
\protected\def\XINT_expr_usethe #1#2#3% modified in 1.09j
   {\xintError:missing_xintthe!\show#3missing xintthe (see log)!}%
\def\xintthe #1{\romannumeral-`0\expandafter\xint_gobble_iii\romannumeral-`0#1}%
\let\XINT_expr_print     \XINT_expr_unlock
\def\XINT_iexpr_print    #1{\xintRound:csv {\XINT_expr_unlock #1}}%
\def\XINT_flexpr_print   #1{\xintFloat:csv {\XINT_expr_unlock #1}}%
\def\XINT_boolexpr_print #1{\xintIsTrue:csv{\XINT_expr_unlock #1}}%
\def\xintexpr       {\romannumeral0\xinteval      }%
\def\xintfloatexpr  {\romannumeral0\xintfloateval }%
\def\xintiiexpr     {\romannumeral0\xintiieval    }%
\def\xinteval
   {\expandafter\XINT_expr_until_end_a  \romannumeral-`0\XINT_expr_getnext  }%
\def\xintfloateval
   {\expandafter\XINT_flexpr_until_end_a\romannumeral-`0\XINT_expr_getnext  }%
\def\xintiieval
   {\expandafter\XINT_iiexpr_until_end_a\romannumeral-`0\XINT_expr_getnext  }%
\def\xinttheexpr
   {\romannumeral-`0\expandafter\xint_gobble_iii\romannumeral0\xinteval      }%
\def\xintthefloatexpr
   {\romannumeral-`0\expandafter\xint_gobble_iii\romannumeral0\xintfloateval }%
\def\xinttheiiexpr
   {\romannumeral-`0\expandafter\xint_gobble_iii\romannumeral0\xintiieval    }%
\def\xintiexpr      {\romannumeral0\expandafter\expandafter\expandafter
    \XINT_iexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval    }%
\def\xinttheiexpr   {\romannumeral-`0\expandafter\expandafter\expandafter
    \XINT_iexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval    }%
\def\xintboolexpr      {\romannumeral0\expandafter\expandafter\expandafter
    \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval }%
\def\xinttheboolexpr   {\romannumeral-`0\expandafter\expandafter\expandafter
    \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval }%
\let\xintnumexpr   \xintiexpr    % deprecated
\let\xintthenumexpr\xinttheiexpr % deprecated
\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_expr_getnext
{%
    \expandafter\XINT_expr_getnext_checkforbraced_a
    \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_getnext_checkforbraced_a #1% was done later in <1.09i
{%
    \expandafter\XINT_expr_getnext_checkforbraced_b\expandafter
    {\romannumeral-`0#1}%
}%
\def\XINT_expr_getnext_checkforbraced_b #1%
{%
    \XINT_expr_getnext_checkforbraced_c #1\xint_relax\Z {#1}%
}%
\def\XINT_expr_getnext_checkforbraced_c #1#2%
{%
    \xint_UDxintrelaxfork
             #1\XINT_expr_getnext_wasemptyorspace
             #2\XINT_expr_getnext_gotonetoken_wehope
    \xint_relax\XINT_expr_getnext_gotbracedstuff
    \krof
}% doubly braced things are not acceptable, will cause errors.
\def\XINT_expr_getnext_wasemptyorspace #1{\XINT_expr_getnext }%
\def\XINT_expr_getnext_gotbracedstuff #1\xint_relax\Z #2%
{%
    \expandafter\XINT_expr_getop\csname .=#2\endcsname
}%
\def\XINT_expr_getnext_gotonetoken_wehope\Z #1%
{% screens out sub-expressions and \count or \dimen registers/variables
    \xint_gob_til_! #1\XINT_expr_subexpr !% recall this ! has catcode 11
    \ifcat\relax#1% \count or \numexpr etc... token or count, dimen, skip cs
       \expandafter\XINT_expr_countdimenetc_fork
    \else
       \expandafter\expandafter\expandafter
       \XINT_expr_getnext_onetoken_fork\expandafter\string
    \fi
    #1%
}%
\def\XINT_expr_subexpr !#1\fi !{\expandafter\XINT_expr_getop\xint_gobble_iii }%
\def\XINT_expr_countdimenetc_fork #1%
{%
    \ifx\count#1\else\ifx#1\dimen\else\ifx#1\numexpr\else\ifx#1\dimexpr\else
    \ifx\skip#1\else\ifx\glueexpr#1\else
      \XINT_expr_unpackvariable
    \fi\fi\fi\fi\fi\fi
    \expandafter\XINT_expr_getnext\number #1%
}%
\def\XINT_expr_unpackvariable\fi\fi\fi\fi\fi\fi\expandafter\XINT_expr_getnext
                \number #1{\fi\fi\fi\fi\fi\fi
    \expandafter\XINT_expr_getop\csname .=\number#1\endcsname }%
\begingroup
\lccode`*=`#
\lowercase{\endgroup
\def\XINT_expr_sixwayfork #1(-.+*#2#3\krof {#2}%
\def\XINT_expr_getnext_onetoken_fork #1%
{% The * is in truth catcode 12 #. For (hacking) use with \xintNewExpr.
    \XINT_expr_sixwayfork
        #1-.+*{\xint_c_xviii ({}}% back to until for oparen triggering
        (#1.+*{-}%
        (-#1+*{\XINT_expr_scandec_II .}%
        (-.#1*{\XINT_expr_getnext }%
         (-.+#1{\XINT_expr_scandec_II }%
         (-.+*{\XINT_expr_scan_dec_or_func #1}%
    \krof
}}%
\def\XINT_expr_scan_dec_or_func #1% this #1 has necessarily here catcode 12
{%
    \ifnum \xint_c_ix<1#1
        \expandafter\XINT_expr_scandec_I
    \else
        \if #1"\expandafter\expandafter\expandafter\XINT_expr_scanhex_I
        \else % We assume we are dealing with a function name!!
              \expandafter\expandafter\expandafter\XINT_expr_scanfunc
        \fi
    \fi #1%
}%
\def\XINT_expr_scanfunc
{%
    \expandafter\XINT_expr_func\romannumeral-`0\XINT_expr_scanfunc_c
}%
\def\XINT_expr_scanfunc_c #1%
{%
    \expandafter #1\romannumeral-`0\expandafter
    \XINT_expr_scanfunc_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scanfunc_a #1% please no braced things here!
{%
    \ifcat #1\relax % missing opening parenthesis, probably
        \expandafter\XINT_expr_scanfunc_panic
    \else
        \xint_afterfi{\expandafter\XINT_expr_scanfunc_b \string #1}%
    \fi
}%
\def\xint_UDparenfork #1()#2#3\krof {#2}%
\def\XINT_expr_scanfunc_b #1%
{%
    \xint_UDparenfork
        #1){(}% and then \XINT_expr_func
        (#1{(}% and then \XINT_expr_func (this is for bool/toggle names)
         (){\XINT_expr_scanfunc_c #1}%
    \krof
}%
\def\XINT_expr_scanfunc_panic {\xintError:bigtroubleahead(0\relax }%
\def\XINT_expr_func #1(% common to expr and flexpr and iiexpr
{%
    \xint_c_xviii @{#1}% functions have the highest priority.
}%
\def\XINT_expr_scandec_I
{%
    \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
    \XINT_expr_lock\romannumeral-`0\XINT_expr_scanintpart_b
}%
\def\XINT_expr_scandec_II
{%
    \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
    \XINT_expr_lock\romannumeral-`0\XINT_expr_scanfracpart_b
}%
\def\XINT_expr_scanintpart_a #1% Please no braced material: 123{FORBIDDEN}
{%  careful that ! has catcode letter here
    \ifcat #1\relax\else
           \ifx !#1\else
        \expandafter\expandafter\expandafter
        \xint_thirdofthree
    \fi\fi
    \xint_firstoftwo !% this stops the scan
    {\expandafter\XINT_expr_scanintpart_aa\string }#1%
}%
\def\XINT_expr_scanintpart_aa #1%
{%
    \ifnum \xint_c_ix<1#1
       \expandafter\XINT_expr_scanintpart_b
    \else
       \if .#1%
           \expandafter\expandafter\expandafter
           \XINT_expr_scandec_transition
       \else % gather what we got so far, leave catcode 12 #1 in stream
           \expandafter\expandafter\expandafter !% ! of catcode 11, space needed
       \fi
    \fi
    #1%
}%
\def\XINT_expr_scanintpart_b #1%
{%
    \expandafter #1\romannumeral-`0\expandafter
    \XINT_expr_scanintpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scandec_transition .%
{%
    \expandafter.\romannumeral-`0\expandafter
    \XINT_expr_scanfracpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scanfracpart_a #1%
{%
    \ifcat #1\relax\else
           \ifx !#1\else
        \expandafter\expandafter\expandafter
        \xint_thirdofthree
    \fi\fi
    \xint_firstoftwo !% this stops the scan
    {\expandafter\XINT_expr_scanfracpart_aa\string }#1%
}%
\def\XINT_expr_scanfracpart_aa #1%
{%
    \ifnum \xint_c_ix<1#1
       \expandafter\XINT_expr_scanfracpart_b
    \else
       \expandafter !%
    \fi
    #1%
}%
\def\XINT_expr_scanfracpart_b #1%
{%
    \expandafter #1\romannumeral-`0\expandafter
    \XINT_expr_scanfracpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scanhex_I #1%
{%
    \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
    \XINT_expr_lock\expandafter\XINT_expr_inhex
    \romannumeral-`0\XINT_expr_scanhexI_a
}%
\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
{%
    \if#2I\xintHexToDec{#1}%
    \else
      \xintiiMul{\xintiiPow{625}{\xintLength{#3}}}{\xintHexToDec{#1#3}}%
      [\the\numexpr-4*\xintLength{#3}]%
    \fi
}%
\def\XINT_expr_scanhexI_a #1%
{%
    \ifcat #1\relax\else
           \ifx !#1\else
        \expandafter\expandafter\expandafter
        \xint_thirdofthree
    \fi\fi
    \xint_firstoftwo {.I;!}%
    {\expandafter\XINT_expr_scanhexI_aa\string }#1%
}%
\def\XINT_expr_scanhexI_aa #1%
{%
    \if\ifnum`#1>`/
       \ifnum`#1>`9
       \ifnum`#1>`@
       \ifnum`#1>`F
       0\else1\fi\else0\fi\else1\fi\else0\fi 1%
       \expandafter\XINT_expr_scanhexI_b
    \else
       \if .#1%
           \expandafter\xint_firstoftwo
       \else % gather what we got so far, leave catcode 12 #1 in stream
           \expandafter\xint_secondoftwo
       \fi
       {\expandafter\XINT_expr_scanhex_transition}%
       {\xint_afterfi {.I;!}}%
    \fi
    #1%
}%
\def\XINT_expr_scanhexI_b #1%
{%
    \expandafter #1\romannumeral-`0\expandafter
    \XINT_expr_scanhexI_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scanhex_transition .%
{%
    \expandafter.\expandafter.\romannumeral-`0\expandafter
    \XINT_expr_scanhexII_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scanhexII_a #1%
{%
    \ifcat #1\relax\else
           \ifx !#1\else
        \expandafter\expandafter\expandafter
        \xint_thirdofthree
    \fi\fi
    \xint_firstoftwo {;!}% this stops the scan
    {\expandafter\XINT_expr_scanhexII_aa\string }#1%
}%
\def\XINT_expr_scanhexII_aa #1%
{%
    \if\ifnum`#1>`/
       \ifnum`#1>`9
       \ifnum`#1>`@
       \ifnum`#1>`F
       0\else1\fi\else0\fi\else1\fi\else0\fi 1%
       \expandafter\XINT_expr_scanhexII_b
    \else
       \xint_afterfi {;!}%
    \fi
    #1%
}%
\def\XINT_expr_scanhexII_b #1%
{%
    \expandafter #1\romannumeral-`0\expandafter
    \XINT_expr_scanhexII_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_getop #1% this #1 is the current locked computed value
{%  full expansion of next token, first swallowing a possible space
    \expandafter\XINT_expr_getop_a\expandafter #1%
    \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_getop_a #1#2%
{%  if a control sequence is found, must be either \relax or register|variable
    \ifcat #2\relax\expandafter\xint_firstoftwo
             \else \expandafter\xint_secondoftwo
    \fi
    {\ifx #2\relax\expandafter\xint_firstofthree
             \else\expandafter\xint_secondofthree % tacit multiplication
     \fi }%
    {\ifx !#2\expandafter\xint_secondofthree      % tacit multiplication
        \else            % 1.09k adds tacit multiplication in front of (
          \if (#2\expandafter\expandafter\expandafter\xint_secondofthree
          \else
            \expandafter\expandafter\expandafter\xint_thirdofthree
          \fi
     \fi }%
    {\XINT_expr_foundend #1}%
    {\XINT_expr_foundop *#1#2}%
    {\XINT_expr_foundop #2#1}%
}%
\def\XINT_expr_foundend {\xint_c_ \relax }% \relax is a place holder here.
\def\XINT_expr_foundop #1% then becomes <prec> <op> and is followed by <\.=f>
{%  1.09a: no control sequence \XINT_expr_op_#1, code common to expr/flexpr
    \ifcsname XINT_expr_precedence_#1\endcsname
        \expandafter\xint_afterfi\expandafter
        {\csname XINT_expr_precedence_#1\endcsname #1}%
    \else
        \XINT_expr_unexpectedtoken
        \expandafter\XINT_expr_getop
    \fi
}%
\def\XINT_tmpa #1#2#3#4#5%
{%
    \def#1##1%
    {%
        \xint_UDsignfork
                     ##1{\expandafter#1\romannumeral-`0#3}%
                       -{#2##1}%
        \krof
    }%
    \def#2##1##2%
    {%
        \ifcase ##1\expandafter #4%
        \or\xint_afterfi{%
                          \XINT_expr_extra_closing_paren
                          \expandafter #1\romannumeral-`0\XINT_expr_getop
                        }%
        \else
 \xint_afterfi{\expandafter#1\romannumeral-`0\csname XINT_#5_op_##2\endcsname }%
        \fi
    }%
}%
\xintFor #1 in {expr,flexpr,iiexpr} \do {%
\expandafter\XINT_tmpa
    \csname XINT_#1_until_end_a\expandafter\endcsname
    \csname XINT_#1_until_end_b\expandafter\endcsname
    \csname XINT_#1_op_-vi\expandafter\endcsname
    \csname XINT_#1_done\endcsname
    {#1}%
}%
\def\XINT_expr_extra_closing_paren {\xintError:removed }%
\def\XINT_tmpa #1#2#3#4#5#6%
{%
    \def #1{\expandafter #3\romannumeral-`0\XINT_expr_getnext }%
    \let #2#1%
    \def #3##1{\xint_UDsignfork
                ##1{\expandafter #3\romannumeral-`0#5}%
                  -{#4##1}%
               \krof }%
    \def #4##1##2%
    {%
        \ifcase ##1\expandafter \XINT_expr_missing_cparen
             \or   \expandafter \XINT_expr_getop
             \else \xint_afterfi
        {\expandafter #3\romannumeral-`0\csname XINT_#6_op_##2\endcsname }%
        \fi
    }%
}%
\xintFor #1 in {expr,flexpr,iiexpr} \do {%
\expandafter\XINT_tmpa
    \csname XINT_#1_op_(\expandafter\endcsname
    \csname XINT_#1_oparen\expandafter\endcsname
    \csname XINT_#1_until_)_a\expandafter\endcsname
    \csname XINT_#1_until_)_b\expandafter\endcsname
    \csname XINT_#1_op_-vi\endcsname
    {#1}%
}%
\def\XINT_expr_missing_cparen {\xintError:inserted \xint_c_ \XINT_expr_done }%
\expandafter\let\csname XINT_expr_precedence_)\endcsname   \xint_c_i
\expandafter\let\csname XINT_flexpr_precedence_)\endcsname \xint_c_i
\expandafter\let\csname XINT_iiexpr_precedence_)\endcsname \xint_c_i
\expandafter\let\csname XINT_expr_op_)\endcsname  \XINT_expr_getop
\expandafter\let\csname XINT_flexpr_op_)\endcsname\XINT_expr_getop
\expandafter\let\csname XINT_iiexpr_op_)\endcsname\XINT_expr_getop
\def\XINT_tmpb #1#2#3#4#5#6%#7%
{%
    \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
    \csname XINT_#1_op_-#5\expandafter\endcsname
    \csname xint_c_#4\expandafter\endcsname
    \csname #2#6\expandafter\endcsname
    \csname XINT_expr_precedence_#3\endcsname {#1}%{#7}%
}%
\def\XINT_tmpc #1#2#3#4#5#6#7#8#9%
{%
    \def #1##1% \XINT_expr_op_<op>
    {% keep value, get next number and operator, then do until
        \expandafter #2\expandafter ##1%
        \romannumeral-`0\expandafter\XINT_expr_getnext
    }%
    \def #2##1##2% \XINT_expr_until_<op>_a
    {\xint_UDsignfork
        ##2{\expandafter #2\expandafter ##1\romannumeral-`0#4}%
          -{#3##1##2}%
     \krof }%
    \def #3##1##2##3##4% \XINT_expr_until_<op>_b
    {%  either execute next operation now, or first do next (possibly unary)
      \ifnum ##2>#5%
        \xint_afterfi {\expandafter #2\expandafter ##1\romannumeral-`0%
                       \csname XINT_#8_op_##3\endcsname {##4}}%
      \else
        \xint_afterfi
        {\expandafter ##2\expandafter ##3%
      \csname .=#6#9{\XINT_expr_unlock ##1}{\XINT_expr_unlock ##4}\endcsname }%
      \fi
    }%
    \let #7#5%
}%
\def\XINT_tmpa #1{\XINT_tmpb {expr}{xint}#1{}}%
\xintApplyInline {\XINT_tmpa }{%
  {|{iii}{vi}{OR}}%
  {&{iv}{vi}{AND}}%
  {<{v}{vi}{Lt}}%
  {>{v}{vi}{Gt}}%
  {={v}{vi}{Eq}}%
  {+{vi}{vi}{Add}}%
  {-{vi}{vi}{Sub}}%
  {*{vii}{vii}{Mul}}%
  {/{vii}{vii}{Div}}%
  {^{viii}{viii}{Pow}}%
  {e{ix}{ix}{fE}}%
  {E{ix}{ix}{fE}}%
}%
\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_tmpa #1{\XINT_tmpb {flexpr}{XINTinFloat}#1{[\XINTdigits]}}%
\xintApplyInline {\XINT_tmpa }{%
  {+{vi}{vi}{Add}}%
  {-{vi}{vi}{Sub}}%
  {*{vii}{vii}{Mul}}%
  {/{vii}{vii}{Div}}%
  {^{viii}{viii}{Power}}%
  {e{ix}{ix}{fE}}%
  {E{ix}{ix}{fE}}%
}%
\def\XINT_tmpa #1{\XINT_tmpb {iiexpr}{xint}#1{}}%
\xintApplyInline {\XINT_tmpa }{%
  {|{iii}{vi}{OR}}%
  {&{iv}{vi}{AND}}%
  {<{v}{vi}{Lt}}%
  {>{v}{vi}{Gt}}%
  {={v}{vi}{Eq}}%
  {+{vi}{vi}{iiAdd}}%
  {-{vi}{vi}{iiSub}}%
  {*{vii}{vii}{iiMul}}%
  {/{vii}{vii}{iiQuo}}%
  {^{viii}{viii}{iiPow}}%
  {e{ix}{ix}{iE}}%
  {E{ix}{ix}{iE}}%
}%
\def\XINT_tmpa #1#2#3#4#5#6%
{%
    \def #1##1% \XINT_expr_op_,_a
    {%
        \expandafter #2\expandafter ##1\romannumeral-`0\XINT_expr_getnext
    }%
    \def #2##1##2% \XINT_expr_until_,_a
    {\xint_UDsignfork
        ##2{\expandafter #2\expandafter ##1\romannumeral-`0#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%
                       \csname XINT_#6_op_##3\endcsname {##4}}%
      \else
        \xint_afterfi
        {\expandafter ##2\expandafter ##3%
         \csname .=\XINT_expr_unlock ##1,\XINT_expr_unlock ##4\endcsname }%
      \fi
    }%
    \let #5\xint_c_ii
}%
\xintFor #1 in {expr,flexpr,iiexpr} \do {%
\expandafter\XINT_tmpa
    \csname XINT_#1_op_,\expandafter\endcsname
    \csname XINT_#1_until_,_a\expandafter\endcsname
    \csname XINT_#1_until_,_b\expandafter\endcsname
    \csname XINT_#1_op_-vi\expandafter\endcsname
    \csname XINT_expr_precedence_,\endcsname {#1}%
}%
\def\XINT_tmpa #1#2#3%
{%
    \expandafter\XINT_tmpb
    \csname XINT_#1_op_-#3\expandafter\endcsname
    \csname XINT_#1_until_-#3_a\expandafter\endcsname
    \csname XINT_#1_until_-#3_b\expandafter\endcsname
    \csname xint_c_#3\endcsname {#1}#2%
}%
\def\XINT_tmpb #1#2#3#4#5#6%
{%
    \def #1% \XINT_expr_op_-<level>
    {%  get next number+operator then switch to _until macro
        \expandafter #2\romannumeral-`0\XINT_expr_getnext
    }%
    \def #2##1% \XINT_expr_until_-<l>_a
    {\xint_UDsignfork
        ##1{\expandafter #2\romannumeral-`0#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%
                        \csname XINT_#5_op_##2\endcsname {##3}}%
        \else
         \xint_afterfi {\expandafter ##1\expandafter ##2%
                        \csname .=#6{\XINT_expr_unlock ##3}\endcsname }%
        \fi
    }%
}%
\xintApplyInline{\XINT_tmpa {expr}\xintOpp}{{vi}{vii}{viii}{ix}}%
\xintApplyInline{\XINT_tmpa {flexpr}\xintOpp}{{vi}{vii}{viii}{ix}}%
\xintApplyInline{\XINT_tmpa {iiexpr}\xintiiOpp}{{vi}{vii}{viii}{ix}}%
\let\XINT_expr_precedence_? \xint_c_x
\def \XINT_expr_op_? #1#2#3%
{%
        \xintifZero{\XINT_expr_unlock  #1}%
                   {\XINT_expr_getnext #3}%
                   {\XINT_expr_getnext #2}%
}%
\let\XINT_flexpr_op_?\XINT_expr_op_?
\let\XINT_iiexpr_op_?\XINT_expr_op_?
\let\XINT_expr_precedence_: \xint_c_x
\def \XINT_expr_op_: #1#2#3#4%
{%
        \xintifSgn {\XINT_expr_unlock  #1}%
                   {\XINT_expr_getnext #2}%
                   {\XINT_expr_getnext #3}%
                   {\XINT_expr_getnext #4}%
}%
\let\XINT_flexpr_op_:\XINT_expr_op_:
\let\XINT_iiexpr_op_:\XINT_expr_op_:
\let\XINT_expr_precedence_! \xint_c_x
\def\XINT_expr_op_! #1{\expandafter\XINT_expr_getop
       \csname .=\xintFac{\XINT_expr_unlock #1}\endcsname }%
\let\XINT_flexpr_op_!\XINT_expr_op_!
\def\XINT_iiexpr_op_! #1{\expandafter\XINT_expr_getop
       \csname .=\xintiFac{\XINT_expr_unlock #1}\endcsname }%
\def\XINT_tmpa #1#2#3#4{%
    \def #1##1%
    {%
        \ifcsname XINT_expr_onlitteral_##1\endcsname
           \expandafter\XINT_expr_funcoflitteral
        \else
           \expandafter #2%
        \fi {##1}%
    }%
   \def #2##1%
   {%
        \ifcsname XINT_#4_func_##1\endcsname
        \xint_afterfi
            {\expandafter\expandafter\csname XINT_#4_func_##1\endcsname}%
        \else \csname xintError:unknown `##1\string'\endcsname
              \xint_afterfi{\expandafter\XINT_expr_func_unknown}%
        \fi
        \romannumeral-`0#3%
   }%
}%
\xintFor #1 in {expr,flexpr,iiexpr} \do {%
     \expandafter\XINT_tmpa
                 \csname XINT_#1_op_@\expandafter\endcsname
                 \csname XINT_#1_op_@@\expandafter\endcsname
                 \csname XINT_#1_oparen\endcsname {#1}%
}%
\def\XINT_expr_funcoflitteral #1%
{%
    \expandafter\expandafter\csname XINT_expr_onlitteral_#1\endcsname
    \romannumeral-`0\XINT_expr_scanfunc
}%
\def\XINT_expr_onlitteral_bool #1#2#3{\expandafter\XINT_expr_getop
    \csname .=\xintBool{#3}\endcsname }%
\def\XINT_expr_onlitteral_togl #1#2#3{\expandafter\XINT_expr_getop
    \csname .=\xintToggle{#3}\endcsname }%
\def\XINT_expr_func_unknown #1#2#3%  1.09i removes [0], because \xintiiexpr
   {\expandafter #1\expandafter #2\csname .=0\endcsname }%
\def\XINT_expr_func_reduce #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintIrr {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_reduce\XINT_expr_func_reduce
\def\XINT_expr_func_frac #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintTFrac {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_frac #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
    .=\XINTinFloatFrac [\XINTdigits]{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_sqr #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintSqr {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_sqr #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
             .=\XINTinFloatMul [\XINTdigits]%
            {\XINT_expr_unlock #3}{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_iiexpr_func_sqr #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiiSqr {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_abs #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintAbs {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_abs\XINT_expr_func_abs
\def\XINT_iiexpr_func_abs #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiiAbs {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_sgn #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintSgn {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_sgn\XINT_expr_func_sgn
\def\XINT_iiexpr_func_sgn #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiiSgn {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_floor #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintFloor {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_floor\XINT_expr_func_floor
\let\XINT_iiexpr_func_floor\XINT_expr_func_floor
\def\XINT_expr_func_ceil #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintCeil {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_ceil\XINT_expr_func_ceil
\let\XINT_iiexpr_func_ceil\XINT_expr_func_ceil
\def\XINT_expr_twoargs #1,#2,{{#1}{#2}}%
\def\XINT_expr_func_quo #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\expandafter\expandafter\xintQuo
    \expandafter\XINT_expr_twoargs
    \romannumeral-`0\XINT_expr_unlock #3,\endcsname
}%
\let\XINT_flexpr_func_quo\XINT_expr_func_quo
\def\XINT_iiexpr_func_quo #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\expandafter\expandafter\xintiiQuo
    \expandafter\XINT_expr_twoargs
    \romannumeral-`0\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_expr_func_rem #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\expandafter\expandafter\xintRem
    \expandafter\XINT_expr_twoargs
    \romannumeral-`0\XINT_expr_unlock #3,\endcsname
}%
\let\XINT_flexpr_func_rem\XINT_expr_func_rem
\def\XINT_iiexpr_func_rem #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\expandafter\expandafter\xintiiRem
    \expandafter\XINT_expr_twoargs
    \romannumeral-`0\XINT_expr_unlock #3,\endcsname
}%
\def\XINT_expr_oneortwo #1#2#3,#4,#5.%
{%
    \if\relax#5\relax\expandafter\xint_firstoftwo\else
                     \expandafter\xint_secondoftwo\fi
    {#1{0}}{#2{\xintNum {#4}}}{#3}%
}%
\def\XINT_expr_func_round #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\XINT_expr_oneortwo
    \expandafter\xintiRound\expandafter\xintRound
    \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
}%
\let\XINT_flexpr_func_round\XINT_expr_func_round
\def\XINT_iiexpr_oneortwo #1#2,#3,#4.%
{%
    \if\relax#4\relax\expandafter\xint_firstoftwo\else
                     \expandafter\xint_secondoftwo\fi
    {#1{0}}{#1{#3}}{#2}%
}%
\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
}%
\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
}%
\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
}%
\def\XINT_expr_argandopt #1,#2,#3.%
{%
    \if\relax#3\relax\expandafter\xint_firstoftwo\else
                     \expandafter\xint_secondoftwo\fi
    {[\XINTdigits]}{[\xintNum {#2}]}{#1}%
}%
\def\XINT_expr_func_float #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\XINTinFloat
    \romannumeral-`0\expandafter\XINT_expr_argandopt
    \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
}%
\let\XINT_flexpr_func_float\XINT_expr_func_float
\def\XINT_expr_func_sqrt #1#2#3%
{%
    \expandafter #1\expandafter #2\csname .=%
    \expandafter\XINTinFloatSqrt
    \romannumeral-`0\expandafter\XINT_expr_argandopt
    \romannumeral-`0\XINT_expr_unlock #3,,.\endcsname
}%
\let\XINT_flexpr_func_sqrt\XINT_expr_func_sqrt
\def\XINT_iiexpr_func_sqrt #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiSqrt {\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_gcd #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintGCDof:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_gcd\XINT_expr_func_gcd
\let\XINT_iiexpr_func_gcd\XINT_expr_func_gcd
\def\XINT_expr_func_lcm #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintLCMof:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_lcm\XINT_expr_func_lcm
\let\XINT_iiexpr_func_lcm\XINT_expr_func_lcm
\def\XINT_expr_func_max #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintMaxof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_iiexpr_func_max #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiMaxof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_max #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\XINTinFloatMaxof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_min #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintMinof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_iiexpr_func_min #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiMinof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_min #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\XINTinFloatMinof:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_sum #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintSum:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_sum #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\XINTinFloatSum:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_iiexpr_func_sum #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiiSum:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_expr_func_prd #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintPrd:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_flexpr_func_prd #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\XINTinFloatPrd:csv{\XINT_expr_unlock #3}\endcsname
}%
\def\XINT_iiexpr_func_prd #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintiiPrd:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_expr_func_add\XINT_expr_func_sum
\let\XINT_expr_func_mul\XINT_expr_func_prd
\let\XINT_flexpr_func_add\XINT_flexpr_func_sum
\let\XINT_flexpr_func_mul\XINT_flexpr_func_prd
\let\XINT_iiexpr_func_add\XINT_iiexpr_func_sum
\let\XINT_iiexpr_func_mul\XINT_iiexpr_func_prd
\def\XINT_expr_func_? #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintIsNotZero {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_? \XINT_expr_func_?
\let\XINT_iiexpr_func_? \XINT_expr_func_?
\def\XINT_expr_func_! #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintIsZero {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_! \XINT_expr_func_!
\let\XINT_iiexpr_func_! \XINT_expr_func_!
\def\XINT_expr_func_not #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintIsZero {\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_not \XINT_expr_func_not
\let\XINT_iiexpr_func_not \XINT_expr_func_not
\def\XINT_expr_func_all #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintANDof:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_all\XINT_expr_func_all
\let\XINT_iiexpr_func_all\XINT_expr_func_all
\def\XINT_expr_func_any #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintORof:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_any\XINT_expr_func_any
\let\XINT_iiexpr_func_any\XINT_expr_func_any
\def\XINT_expr_func_xor #1#2#3%
{%
    \expandafter #1\expandafter #2\csname
         .=\xintXORof:csv{\XINT_expr_unlock #3}\endcsname
}%
\let\XINT_flexpr_func_xor\XINT_expr_func_xor
\let\XINT_iiexpr_func_xor\XINT_expr_func_xor
\def\xintifNotZero:: #1,#2,#3,{\xintifNotZero{#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
}%
\let\XINT_flexpr_func_if\XINT_expr_func_if
\let\XINT_iiexpr_func_if\XINT_expr_func_if
\def\xintifSgn:: #1,#2,#3,#4,{\xintifSgn{#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
}%
\let\XINT_flexpr_func_ifsgn\XINT_expr_func_ifsgn
\let\XINT_iiexpr_func_ifsgn\XINT_expr_func_ifsgn
\def\XINT_newexpr_print #1{\ifnum\xintNthElt{0}{#1}>1
                            \expandafter\xint_firstoftwo
                           \else
                            \expandafter\xint_secondoftwo
                           \fi
                           {_xintListWithSep,{#1}}{\xint_firstofone#1}}%
\xintForpair #1#2 in {(fl,Float),(i,iRound0),(bool,IsTrue)}\do {%
    \expandafter\def\csname XINT_new#1expr_print\endcsname
                      ##1{\ifnum\xintNthElt{0}{##1}>1
                            \expandafter\xint_firstoftwo
                           \else
                            \expandafter\xint_secondoftwo
                           \fi
                           {_xintListWithSep,{\xintApply{_xint#2}{##1}}}
                           {_xint#2##1}}}%
\toks0 {}%
\xintFor #1 in {Bool,Toggle,Floor,Ceil,iRound,Round,iTrunc,Trunc,TFrac,%
        Lt,Gt,Eq,AND,OR,IsNotZero,IsZero,ifNotZero,ifSgn,%
        Irr,Num,Abs,Sgn,Opp,Quo,Rem,Add,Sub,Mul,Sqr,Div,Pow,Fac,fE,iSqrt,%
        iiAdd,iiSub,iiMul,iiSqr,iiPow,iiQuo,iiRem,iiSgn,iiAbs,iiOpp,iE}\do
 {\toks0
  \expandafter{\the\toks0\expandafter\def\csname xint#1\endcsname {_xint#1}}}%
\xintFor #1 in {,Sqrt,Add,Sub,Mul,Div,Power,fE,Frac}\do
  {\toks0
   \expandafter{\the\toks0\expandafter\def\csname XINTinFloat#1\endcsname
              {_XINTinFloat#1}}}%
\xintFor #1 in {GCDof,LCMof,Maxof,Minof,ANDof,ORof,XORof,Sum,Prd,%
                iMaxof,iMinof,iiSum,iiPrd}\do
 {\toks0
  \expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname
                ####1{_xint#1{\xintCSVtoListNonStripped {####1}}}}}%
\xintFor #1 in {Maxof,Minof,Sum,Prd}\do
 {\toks0
  \expandafter{\the\toks0\expandafter\def\csname XINTinFloat#1:csv\endcsname
                ####1{_XINTinFloat#1{\xintCSVtoListNonStripped {####1}}}}}%
\expandafter\def\expandafter\XINT_expr_protect\expandafter{\the\toks0
    \def\XINTdigits {_XINTdigits}%
    \def\XINT_expr_print ##1{\expandafter\XINT_newexpr_print\expandafter
            {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}%
    \def\XINT_flexpr_print ##1{\expandafter\XINT_newflexpr_print\expandafter
            {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}%
    \def\XINT_iexpr_print ##1{\expandafter\XINT_newiexpr_print\expandafter
            {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}%
    \def\XINT_boolexpr_print ##1{\expandafter\XINT_newboolexpr_print\expandafter
            {\romannumeral0\xintcsvtolistnonstripped{\XINT_expr_unlock ##1}}}%
}%
\toks0 {}%
\def\xintNewExpr      {\xint_NewExpr\xinttheexpr      }%
\def\xintNewFloatExpr {\xint_NewExpr\xintthefloatexpr }%
\def\xintNewIExpr     {\xint_NewExpr\xinttheiexpr     }%
\let\xintNewNumExpr\xintNewIExpr
\def\xintNewIIExpr    {\xint_NewExpr\xinttheiiexpr    }%
\def\xintNewBoolExpr  {\xint_NewExpr\xinttheboolexpr  }%
\def\xint_NewExpr #1#2[#3]%
{%
 \begingroup
    \ifcase #3\relax
        \toks0 {\xdef #2}%
    \or \toks0 {\xdef #2##1}%
    \or \toks0 {\xdef #2##1##2}%
    \or \toks0 {\xdef #2##1##2##3}%
    \or \toks0 {\xdef #2##1##2##3##4}%
    \or \toks0 {\xdef #2##1##2##3##4##5}%
    \or \toks0 {\xdef #2##1##2##3##4##5##6}%
    \or \toks0 {\xdef #2##1##2##3##4##5##6##7}%
    \or \toks0 {\xdef #2##1##2##3##4##5##6##7##8}%
    \or \toks0 {\xdef #2##1##2##3##4##5##6##7##8##9}%
    \fi
    \xintexprSafeCatcodes
    \escapechar92
    \XINT_NewExpr #1%
}%
\catcode`* 13
\def\XINT_NewExpr #1#2%
{%
    \def\XINT_tmpa ##1##2##3##4##5##6##7##8##9{#2}%
    \XINT_expr_protect
    \lccode`*=`_ \lowercase {\def*}{!noexpand!}%
    \catcode`_ 13 \catcode`: 11
    \endlinechar -1 % 1.09i, 2013/12/18 not sure why I had that? removed.
    % 2014/02/13: you idiot, if not then spurious extra ending space
    % token makes impossible nesting of created macros!
    \everyeof {\noexpand }%
    \edef\XINT_tmpb ##1##2##3##4##5##6##7##8##9%
        {\scantokens
         \expandafter{\romannumeral-`0#1%
                      \XINT_tmpa {####1}{####2}{####3}%
                                 {####4}{####5}{####6}%
                                 {####7}{####8}{####9}%
                      \relax}}%
     \lccode`*=`\$ \lowercase {\def*}{####}%
     \catcode`\$ 13 \catcode`! 0 \catcode`_ 11 %
     \the\toks0
     {\scantokens\expandafter{\expandafter
                 \XINT_newexpr_setprefix\meaning\XINT_tmpb}}%
  \endgroup
}%
\let\xintexprRestoreCatcodes\empty
\def\xintexprSafeCatcodes
{% for end user.
    \edef\xintexprRestoreCatcodes  {%
        \catcode34=\the\catcode34   % "
        \catcode63=\the\catcode63   % ?
        \catcode124=\the\catcode124 % |
        \catcode38=\the\catcode38   % &
        \catcode33=\the\catcode33   % !
        \catcode93=\the\catcode93   % ]
        \catcode91=\the\catcode91   % [
        \catcode94=\the\catcode94   % ^
        \catcode95=\the\catcode95   % _
        \catcode47=\the\catcode47   % /
        \catcode41=\the\catcode41   % )
        \catcode40=\the\catcode40   % (
        \catcode42=\the\catcode42   % *
        \catcode43=\the\catcode43   % +
        \catcode62=\the\catcode62   % >
        \catcode60=\the\catcode60   % <
        \catcode58=\the\catcode58   % :
        \catcode46=\the\catcode46   % .
        \catcode45=\the\catcode45   % -
        \catcode44=\the\catcode44   % ,
        \catcode61=\the\catcode61   % =
        \catcode32=\the\catcode32\relax % space
    }% it's hard to know where to stop...
        \catcode34=12  % "
        \catcode63=12  % ?
        \catcode124=12 % |
        \catcode38=4   % &
        \catcode33=12  % !
        \catcode93=12  % ]
        \catcode91=12  % [
        \catcode94=7   % ^
        \catcode95=8   % _
        \catcode47=12  % /
        \catcode41=12  % )
        \catcode40=12  % (
        \catcode42=12  % *
        \catcode43=12  % +
        \catcode62=12  % >
        \catcode60=12  % <
        \catcode58=12  % :
        \catcode46=12  % .
        \catcode45=12  % -
        \catcode44=12  % ,
        \catcode61=12  % =
        \catcode32=10  % space
}%
\let\XINT_tmpa\relax \let\XINT_tmpb\relax \let\XINT_tmpc\relax
\XINT_restorecatcodes_endinput%
\endinput
%%
%% End of file `xintexpr.sty'.
