diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-29 11:23:34 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2008-07-29 11:23:34 +0000 |
commit | ef285e6a49a93af098150d0b3125a34d3477ba55 (patch) | |
tree | 124a55595390d358e0cda8ae26f78e9a263e9a21 /Master/texmf-dist/tex/latex/expl3/l3prop.sty | |
parent | e7477f362711cc9d05dfa1ee71301fb34cce2d94 (diff) |
expl3 update (2008/06/20)
git-svn-id: svn://tug.org/texlive/trunk@9869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3prop.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/l3prop.sty | 202 |
1 files changed, 132 insertions, 70 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3prop.sty b/Master/texmf-dist/tex/latex/expl3/l3prop.sty index fe956efcdab..67c2efc2d3a 100644 --- a/Master/texmf-dist/tex/latex/expl3/l3prop.sty +++ b/Master/texmf-dist/tex/latex/expl3/l3prop.sty @@ -48,86 +48,98 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: l3prop.dtx 581 2006-12-12 12:28:27Z morten $ +\GetIdInfo$Id: l3prop.dtx 668 2007-09-27 15:54:23Z mittelba $ {L3 Experimental Property Lists} +\ProvidesExplPackage + {\filename}{\filedate}{\fileversion}{\filedescription} \RequirePackage{l3toks}\par +\RequirePackage{l3quark}\par +\quark_new:N\q_prop + \def_new:Npn \prop_new:N #1{\toks_new:N #1} \def_new:Npn \prop_new:c {\exp_args:Nc \prop_new:N} \let_new:NN \prop_clear:N \toks_clear:N \def_new:Npn \prop_clear:c {\exp_args:Nc\prop_clear:N} \let_new:NN \prop_gclear:N \toks_gclear:N \def_new:Npn \prop_gclear:c {\exp_args:Nc\prop_gclear:N} -\let_new:NN \prop_use:N \toks_use:N -\def_long_new:Npn \prop_split_aux:NNn #1#2#3{ - \def:Npn \tmp:w ##1#2##2##3\q_stop {#3{##1}{##2}{##3}} - \exp_after:NN\tmp:w \prop_use:N#1#2\q_no_value \q_stop} -\def_long_new:NNn \prop_get:NNN 2{ - \prop_split_aux:NNn #1#2\prop_get_aux:w} -\def_long_new:NNn \prop_get_aux:w 4{\toks_set:Nn#4{#2}} -\def_new:Npn \prop_get:cNN { \exp_args:Nc \prop_get:NNN } -\def_long_new:NNn \prop_gget:NNN 2{ - \prop_split_aux:NNn #1#2\prop_gget_aux:w} -\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NNN} -\def_new:Npn \prop_gget:cNN {\exp_args:Nc \prop_gget:NNN} -\def_long_new:NNn \prop_gget_aux:w 4{\toks_gset:Nn#4{#2}} -\def_long_new:NNn \prop_get_gdel:NNN 3{ - \prop_split_aux:NNn #1#2{\prop_get_del_aux:w #3{\toks_gset:Nn #1}#2}} +\def_long_new:Npn \prop_split_aux:Nnn #1#2#3{ + \def:Npn \tmp:w ##1\q_prop#2\q_prop##2##3\q_stop {#3{##1}{##2}{##3}} + \exp_after:NN\tmp:w \toks_use:N#1\q_prop#2\q_prop\q_no_value \q_stop +} +\def_long_new:NNn \prop_get:NnN 2{ + \prop_split_aux:Nnn #1{#2}\prop_get_aux:w} +\def_long_new:NNn \prop_get_aux:w 4{\tlp_set:Nx#4{\exp_not:n{#2}}} +\def_new:Npn \prop_get:cnN { \exp_args:Nc \prop_get:NnN } +\def_long_new:NNn \prop_gget:NnN 2{ + \prop_split_aux:Nnn #1{#2}\prop_gget_aux:w} +\def_new:Npn \prop_gget:NcN {\exp_args:NNc \prop_gget:NnN} +\def_new:Npn \prop_gget:cnN {\exp_args:Nc \prop_gget:NnN} +\def_long_new:NNn \prop_gget_aux:w 4{\tlp_gset:Nx#4{\exp_not:n{#2}}} +\def_long_new:NNn \prop_get_gdel:NnN 3{ + \prop_split_aux:Nnn #1{#2}{\prop_get_del_aux:w #3{\toks_gset:Nn #1}{#2}}} \def_long_new:NNn \prop_get_del_aux:w 6{ - \quark_if_no_value:nF{#5} { - \def:Npn \tmp:w ##1#3\q_no_value {#2{#4##1}} + \tlp_set:Nx #1{\exp_not:n{#5}} + \quark_if_no_value:NF #1 { + \def:Npn \tmp:w ##1\q_prop#3\q_prop\q_no_value {#2{#4##1}} \tmp:w #6} } -\def_long_new:NNn \prop_put:NNn 2{ - \prop_split_aux:NNn #1#2{ - \toks_clear:N #1 - \prop_put_aux:w {\toks_put_right:Nn #1}#2} +\def_long_new:NNn \prop_put:Nnn 2{ + \prop_split_aux:Nnn #1{#2}{ + \prop_clear:N #1 + \prop_put_aux:w {\toks_put_right:Nn #1}{#2}} } -\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:NNn } -\def_long_new:NNn \prop_gput:NNn 2{ - \prop_split_aux:NNn #1#2{ - \toks_gclear:N #1 - \prop_put_aux:w {\toks_gput_right:Nn #1}#2} +\def_new:Npn \prop_put:ccn {\exp_args:Ncc \prop_put:Nnn } + +\def_long_new:NNn \prop_gput:Nnn 2{ + \prop_split_aux:Nnn #1{#2}{ + \prop_gclear:N #1 + \prop_put_aux:w {\toks_gput_right:Nn #1}{#2}} } -\def_new:Npn \prop_gput:NNo {\exp_args:NNNo \prop_gput:NNn} -\def_new:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn} -\def_new:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn} -\def_new:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn} -\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:NNn } -\def_new:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn} -\def_new:Npn \prop_gput:cNn {\exp_args:Nc \prop_gput:NNn} -\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn} -\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:NNn} -\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn} + \def_long_new:NNn \prop_put_aux:w 6{ - #1{#2{#6}#3} - \quark_if_no_value:nF {#4} + #1{\q_prop#2\q_prop{#6}#3} + \tlist_if_empty:nF{#5} { - \def:Npn \tmp:w ##1#2\q_no_value {#1{##1}} + \def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{##1}} \tmp:w #5 } } -\def_long_new:NNn \prop_del:NN 2{ - \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_set:Nn #1}#2}} -\def_long_new:NNn \prop_gdel:NN 2{ - \prop_split_aux:NNn #1#2{\prop_del_aux:w {\toks_gset:Nn #1}#2}} -\def_long_new:NNn \prop_del_aux:w 5{\quark_if_no_value:nF {#4} - {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3##1}}\tmp:w #5}} -\def_new:NNn \prop_if_in:NNTF 2{ - \prop_split_aux:NNn #1#2\prop_if_in_aux:w} -\def_new:Npn \prop_if_in:NOTF {\exp_args:Nno \prop_if_in:NNTF} -\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NNTF} +\def_new:Npn \prop_gput:Nno {\exp_args:NNno \prop_gput:Nnn} +\def_new:Npn \prop_gput:Nnx {\exp_args:NNnx \prop_gput:Nnn} +\def_new:Npn \prop_gput:Nox {\exp_args:NNox \prop_gput:Nnn} +\def_new:Npn \prop_gput:Noo {\exp_args:NNoo \prop_gput:Nnn} +\def_new:Npn \prop_gput:Ncn {\exp_args:NNc \prop_gput:Nnn} +\def_new:Npn \prop_gput:Ooo {\exp_args:NOoo \prop_gput:Nnn} +\def_new:Npn \prop_gput:cnn {\exp_args:Nc \prop_gput:Nnn} +\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:Nnn} +\def_new:Npn \prop_gput:cco {\exp_args:Ncco \prop_gput:Nnn} +\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:Nnn} +\def_long_new:NNn \prop_del:Nn 2{ + \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_set:Nn #1}{#2}}} +\def_long_new:NNn \prop_gdel:Nn 2{ + \prop_split_aux:Nnn #1{#2}{\prop_del_aux:w {\toks_gset:Nn #1}{#2}}} +\def_long_new:NNn \prop_del_aux:w 5{ + \def:Npn \tmp:w {#4} + \quark_if_no_value:NF \tmp:w + {\def:Npn \tmp:w ##1\q_prop#2\q_prop\q_no_value {#1{#3##1}} + \tmp:w #5}} +\def_new:NNn \prop_if_in:NnTF 2{ + \prop_split_aux:Nnn #1{#2}\prop_if_in_aux:w} \def_new:NNn \prop_if_in_aux:w 3{\quark_if_no_value:nFT {#2}} -\def_long_new:NNn \prop_gput_if_new:NNn 2{ - \prop_split_aux:NNn #1#2{\prop_put_if_new_aux:w #1#2}} + +\def_new:Npn \prop_if_in:NoTF {\exp_args:NNo \prop_if_in:NnTF} +\def_new:Npn \prop_if_in:ccTF {\exp_args:Ncc \prop_if_in:NnTF} +\def_long_new:NNn \prop_gput_if_new:Nnn 2{ + \prop_split_aux:Nnn #1{#2}{\prop_put_if_new_aux:w #1{#2}}} \def_long_new:NNn \prop_put_if_new_aux:w 6{ - \quark_if_no_value:nT {#4}{#1{#2{#6}#3}}} + \tlist_if_empty:nT {#5}{#1{\q_prop#2\q_prop{#6}#3}}} \let_new:NN \prop_set_eq:NN \toks_set_eq:NN -\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc +\let_new:NN \prop_set_eq:Nc \toks_set_eq:Nc \let_new:NN \prop_set_eq:cN \toks_set_eq:cN -\let_new:NN \prop_set_eq:cc \toks_set_eq:cc -\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN +\let_new:NN \prop_set_eq:cc \toks_set_eq:cc +\let_new:NN \prop_gset_eq:NN \toks_gset_eq:NN \let_new:NN \prop_gset_eq:Nc \toks_gset_eq:Nc -\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN +\let_new:NN \prop_gset_eq:cN \toks_gset_eq:cN \let_new:NN \prop_gset_eq:cc \toks_gset_eq:cc \let_new:NN \prop_if_empty_p:N \toks_if_empty_p:N \let_new:NN \prop_if_empty_p:c \toks_if_empty_p:c @@ -138,13 +150,13 @@ \let_new:NN \prop_if_empty:cT \toks_if_empty:cTF \let_new:NN \prop_if_empty:cF \toks_if_empty:cF \def_new:NNn \prop_if_eq:NNTF 2 { - \tlist_if_eq:xxTF{\prop_use:N #1}{\prop_use:N #2} + \tlist_if_eq:xxTF{\toks_use:N #1}{\toks_use:N #2} } \def_new:NNn \prop_if_eq:NNT 2 { - \tlist_if_eq:xxT{\prop_use:N #1}{\prop_use:N #2} + \tlist_if_eq:xxT{\toks_use:N #1}{\toks_use:N #2} } \def_new:NNn \prop_if_eq:NNF 2 { - \tlist_if_eq:xxF{\prop_use:N #1}{\prop_use:N #2} + \tlist_if_eq:xxF{\toks_use:N #1}{\toks_use:N #2} } \def_new:Npn \prop_if_eq:NcTF {\exp_args:NNc \prop_if_eq:NNTF} \def_new:Npn \prop_if_eq:NcT {\exp_args:NNc \prop_if_eq:NNT} @@ -156,32 +168,82 @@ \def_new:Npn \prop_if_eq:ccT {\exp_args:Ncc \prop_if_eq:NNT} \def_new:Npn \prop_if_eq:ccF {\exp_args:Ncc \prop_if_eq:NNF} \def_new:Npn \prop_map_function:NN #1#2{ - \exp_after:NN \prop_map_function_aux:NNn - \exp_after:NN #2 \prop_use:N #1 \q_nil \q_no_value \q_stop + \exp_after:NN \prop_map_function_aux:w + \exp_after:NN #2 \toks_use:N #1 \q_prop{}\q_prop \q_no_value \q_stop +} +\def_new:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{ + \if:w \tlist_if_empty_p:n{#2} + \exp_after:NN \prop_map_break:w + \fi: + #1{#2}{#3} + \prop_map_function_aux:w #1 } -\def_new:Npn \prop_map_function_aux:NNn #1#2#3{ - \if_meaning:NN \q_nil #1 + +\def:Npn \prop_map_function:NN #1#2{ + \exp_after:NN \prop_map_function_aux:w + \exp_after:NN #2 \toks_use:N #1 \q_prop \q_no_value \q_prop \q_no_value +} +\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{ + \quark_if_no_value:nF{#2} + { + #1{#2}{#3} + \prop_map_function_aux:w #1 + } +} + +\def:Npn \prop_map_function:NN #1#2{ + \exp_after:NN \prop_map_function_aux:w + \exp_after:NN #2 \toks_use:N #1 \q_prop \q_nil \q_prop \q_no_value \q_stop +} +\def:Npn \prop_map_function_aux:w #1\q_prop#2\q_prop#3{ + \if_meaning:NN \q_nil #2 \exp_after:NN \prop_map_break:w \fi: - #1#2{#3} - \prop_map_function_aux:NNn #1 + #1{#2}{#3} + \prop_map_function_aux:w #1 } + + \def_new:Npn \prop_map_function:cN {\exp_args:Nc \prop_map_function:NN } +\def_new:Npn \prop_map_function:Nc {\exp_args:NNc \prop_map_function:NN } \def_new:Npn \prop_map_function:cc {\exp_args:Ncc \prop_map_function:NN} \num_new:N \l_prop_inline_level_num \def_new:Npn \prop_map_inline:Nn #1#2 { \num_incr:N \l_prop_inline_level_num \def_long:cpn {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n} ##1##2{#2} - \exp_args:NcE \prop_map_function:N + \prop_map_function:Nc #1 {prop_map_inline_ \num_use:N \l_prop_inline_level_num :n} - \prop_use:N #1 - \q_nil \q_no_value \q_stop \num_decr:N \l_prop_inline_level_num } \def_new:Npn \prop_map_inline:cN { \exp_args:Nc \prop_map_inline:NN } - \let_new:NN \prop_map_break:w \use_none_delimit_by_q_stop:w +\def:Npn \prop_put:NNn {\typeout{Warning:~name~ + changed~ to~ \string\prop_put:Nnn}\prop_put:Nnn} +\def:Npn \prop_gput:NNn {\typeout{Warning:~name~ + changed~ to~ \string\prop_gput:Nnn }\prop_gput:Nnn } +\def:Npn \prop_gput:NNo {\typeout{Warning:~name~ + changed~ to~ \string\prop_gput:Nno }\prop_gput:Nno } +\def:Npn \prop_gput:cNn {\typeout{Warning:~name~ + changed~ to~ \string\prop_gput:cnn }\prop_gput:cnn } +\def:Npn \prop_gput_if_new:NNn {\typeout{Warning:~name~ + changed~ to~ \string\prop_gput_if_new:Nnn }\prop_gput_if_new:Nnn } +\def:Npn \prop_get:NNN {\typeout{Warning:~name~ + changed~ to~ \string\prop_get:NnN }\prop_get:NnN } +\def:Npn \prop_get:cNN {\typeout{Warning:~name~ + changed~ to~ \string\prop_get:cnN }\prop_get:cnN } +\def:Npn \prop_gget:NNN {\typeout{Warning:~name~ + changed~ to~ \string\prop_gget:NnN }\prop_gget:NnN } +\def:Npn \prop_gget:cNN {\typeout{Warning:~name~ + changed~ to~ \string\prop_gget:cnN }\prop_gget:cnN } +\def:Npn \prop_get_gdel:NNN {\typeout{Warning:~name~ + changed~ to~ \string\prop_get_gdel:NnN }\prop_get_gdel:NnN } +\def:Npn \prop_del:NN {\typeout{Warning:~name~ + changed~ to~ \string\prop_del:Nn }\prop_del:Nn } +\def:Npn \prop_gdel:NN {\typeout{Warning:~name~ + changed~ to~ \string\prop_gdel:Nn }\prop_gdel:Nn } +\def:Npn \prop_if_in:NNTF {\typeout{Warning:~name~ + changed~ to~ \string\prop_if_in:NnTF }\prop_if_in:NnTF } %% %% %% End of file `l3prop.sty'. |