summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintexpr.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-06-27 16:31:25 +0000
committerKarl Berry <karl@freefriends.org>2013-06-27 16:31:25 +0000
commit82c37dcf73b52a88faef522a2f1a294351deea1a (patch)
tree4c0f4b7b3c5fb16b1b5e0b413fc1a800bc9eef35 /Master/texmf-dist/tex/generic/xint/xintexpr.sty
parenteeeb860e63fdf6d8e9c0c18825a887aec80eed7e (diff)
xint (16jun13)
git-svn-id: svn://tug.org/texlive/trunk@30978 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.sty59
1 files changed, 28 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 14fc53b418c..45378ace18a 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.07a of May 26, 2013)
+%% The xint bundle (version 1.08b of June 14, 2013)
%% xintexpr: Expandable expression parser
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -114,10 +114,10 @@
\endgroup
\edef\XINT_expr_restorecatcodes_endinput
{%
- \catcode94=\the\catcode94 % ^
\catcode33=\the\catcode33 % !
\catcode93=\the\catcode93 % ]
\catcode91=\the\catcode91 % [
+ \catcode94=\the\catcode94 % ^
\catcode96=\the\catcode96 % `
\catcode47=\the\catcode47 % /
\catcode41=\the\catcode41 % )
@@ -140,11 +140,10 @@
\catcode61=\the\catcode61\relax % =
\noexpand\endinput
}%
- \XINT_setcatcodes
+ \XINT_setcatcodes % defined in xint.sty
\catcode91=12 % [
\catcode93=12 % ]
\catcode33=11 % !
- \catcode94=12 % ^
}%
\x
\begingroup
@@ -168,14 +167,7 @@
\fi
\expandafter\x\csname ver@xintexpr.sty\endcsname
\ProvidesPackage{xintexpr}%
- [2013/05/26 v1.07a Expandable expression parser (jfB)]%
-\chardef\xint_c_ 0
-\chardef\xint_c_i 1
-\chardef\xint_c_ii 2
-\chardef\xint_c_iii 3
-\chardef\xint_c_iv 4
-\chardef\xint_c_v 5
-\chardef\xint_c_ix 9
+ [2013/06/14 v1.08b Expandable expression parser (jfB)]%
\def\xint_gob_til_dot #1.{}%
\def\xint_gob_til_dot_andstop #1.{ }%
\def\xint_gob_til_! #1!{}% ! of catcode 11
@@ -200,7 +192,7 @@
\or
\expandafter\XINT_expr_extra_closing_paren
\fi
- \expandafter\XINT_expr_until_end\romannumeral-`0%
+ \expandafter\XINT_expr_until_end\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_extra_closing_paren {\xintError:removed }%
\def\XINT_expr_endofexpr {!\XINT_illegaluse }%
@@ -217,7 +209,8 @@
\ifcase#1%
\expandafter\XINT_expr_missing_cparen
\or
- \else \xint_afterfi{\expandafter\XINT_expr_until_cparen\romannumeral-`0}%
+ \else \xint_afterfi
+ {\expandafter\XINT_expr_until_cparen\romannumeral-`0\romannumeral-`0}%
\fi
}%
\def\XINT_expr_missing_cparen #1%
@@ -251,13 +244,13 @@
\csname .#6{\XINT_expr_string ##1}{\XINT_expr_string ##4}\endcsname }%
\fi
}%
- \global\let #4#5%
+ \let #4#5%
}%
\xint_tmp_def +{ii}{Add}%
\xint_tmp_def -{ii}{Sub}%
\xint_tmp_def *{iii}{Mul}%
\xint_tmp_def /{iii}{Div}%
-\xint_tmp_def ^{iv}{fPow}%
+\xint_tmp_def ^{iv}{Pow}%
\xint_tmp_def e{v}{fE}%
\xint_tmp_def E{v}{fE}%
\def\xint_tmp_def #1%
@@ -309,7 +302,8 @@
\xint_tmp_def {v}%
\def\XINT_expr_getop #1%
{%
- \expandafter\XINT_expr_getop_a\expandafter #1\romannumeral-`0%
+ \expandafter\XINT_expr_getop_a\expandafter #1%
+ \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_getop_a #1#2%
{%
@@ -354,13 +348,14 @@
\expandafter\xint_firstoftwo
\else\expandafter\xint_secondoftwo
\fi{\expandafter\XINT_expr_getop}{\expandafter\XINT_flexpr_getop}%
- \csname .\xintfFac{\XINT_expr_string ##2}/1[0]\endcsname }%
+ \csname .\xintFac{\XINT_expr_string ##2}/1[0]\endcsname }%
\let#2\empty
}%
\xint_tmp_def
\def\XINT_expr_getnext
{%
- \expandafter\XINT_expr_getnext_checkforbraced_a\romannumeral-`0%
+ \expandafter\XINT_expr_getnext_checkforbraced_a
+ \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_getnext_checkforbraced_a #1%
{%
@@ -457,12 +452,12 @@
\def\XINT_expr_scannum_intpart_b #1%
{%
\expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scannum_intpart_a\romannumeral-`0%
+ \XINT_expr_scannum_intpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scannum_transition #1%
{%
\expandafter.\romannumeral-`0\expandafter
- \XINT_expr_scannum_decpart_a\romannumeral-`0%
+ \XINT_expr_scannum_decpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\XINT_expr_scannum_decpart_a #1%
{%
@@ -477,7 +472,7 @@
\def\XINT_expr_scannum_decpart_b #1%
{%
\expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scannum_decpart_a\romannumeral-`0%
+ \XINT_expr_scannum_decpart_a\romannumeral-`0\romannumeral-`0%
}%
\def\xintfloatexpr {\romannumeral0\xintfloateval }%
\def\xintfloateval
@@ -574,7 +569,8 @@
\let\xint_tmp_do_defs\empty
\def\XINT_flexpr_getop #1%
{%
- \expandafter\XINT_flexpr_getop_a\expandafter #1\romannumeral-`0%
+ \expandafter\XINT_flexpr_getop_a\expandafter #1%
+ \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_flexpr_getop_a #1#2%
{%
@@ -606,7 +602,8 @@
\expandafter\let\csname XINT_flexpr_op_)\endcsname\XINT_flexpr_getop
\def\XINT_flexpr_getnext
{%
- \expandafter\XINT_flexpr_getnext_checkforbraced_a\romannumeral-`0%
+ \expandafter\XINT_flexpr_getnext_checkforbraced_a
+ \romannumeral-`0\romannumeral-`0%
}%
\def\XINT_flexpr_getnext_checkforbraced_a #1%
{%
@@ -701,8 +698,8 @@
\def\xintSub {:xintSub}%
\def\xintMul {:xintMul}%
\def\xintDiv {:xintDiv}%
- \def\xintfPow {:xintfPow}%
- \def\xintfFac {:xintfFac}%
+ \def\xintPow {:xintPow}%
+ \def\xintFac {:xintFac}%
\def\xintOpp {:xintOpp}%
\def\xintfE {:xintfE}%
\def\xintraw { :romannumeral0:xintraw}%
@@ -714,11 +711,11 @@
\endlinechar -1
\everyeof {\noexpand }%
\edef\xintNewExprtmp
- {\expandafter\scantokens
+ {\scantokens
\expandafter{\romannumeral0\xinttheeval #3\relax}}%
\lccode`\*=`_ \lowercase {\def*}{####}%
\catcode`_ 13 \catcode`! 0 \catcode`: 11
- \the\toks0 {\expandafter\scantokens\expandafter{\xintNewExprtmp }}%
+ \the\toks0 {\scantokens\expandafter{\xintNewExprtmp }}%
\endgroup
}%
\def\xintNewFloatExpr #1[#2]#3%
@@ -744,7 +741,7 @@
\def\XINTinFloatMul {:XINTinFloatMul}%
\def\XINTinFloatDiv {:XINTinFloatDiv}%
\def\XINTinFloatPower {:XINTinFloatPower}%
- \def\xintfFac {:xintfFac}%
+ \def\xintFac {:xintFac}%
\def\xintOpp {:xintOpp}%
\def\XINTinFloatfE {:XINTinFloatfE}%
\def\xintfloat { :romannumeral0:xintfloat}%
@@ -756,11 +753,11 @@
\endlinechar -1
\everyeof {\noexpand }%
\edef\xintNewExprtmp
- {\expandafter\scantokens
+ {\scantokens
\expandafter{\romannumeral0\xintthefloateval #3\relax}}%
\lccode`\*=`_ \lowercase {\def*}{####}%
\catcode`_ 13 \catcode`! 0 \catcode`: 11
- \the\toks0 {\expandafter\scantokens\expandafter{\xintNewExprtmp }}%
+ \the\toks0 {\scantokens\expandafter{\xintNewExprtmp }}%
\endgroup
}%
\XINT_expr_restorecatcodes_endinput%