%% %% This is file `l3prop.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% l3prop.dtx (with options: `package') %% %% EXPERIMENTAL CODE %% %% Do not distribute this file without also distributing the %% source files specified above. %% %% Do not distribute a modified version of this file. %% %% File: l3prop.dtx Copyright (C) 1990-2012 The LaTeX3 Project %% %% It may be distributed and/or modified under the conditions of the %% LaTeX Project Public License (LPPL), either version 1.3c of this %% license or (at your option) any later version. The latest version %% of this license is in the file %% %% http://www.latex-project.org/lppl.txt %% %% This file is part of the "l3kernel bundle" (The Work in LPPL) %% and all files in that bundle must be distributed together. %% %% The released version of this bundle is available from CTAN. %% %% ----------------------------------------------------------------------- %% %% The development version of the bundle can be found at %% %% http://www.latex-project.org/svnroot/experimental/trunk/ %% %% for those people who are interested. %% %%%%%%%%%%% %% NOTE: %% %%%%%%%%%%% %% %% Snapshots taken from the repository represent work in progress and may %% not work or may contain conflicting material! We therefore ask %% people _not_ to put them into distributions, archives, etc. without %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- \RequirePackage{l3bootstrap} \GetIdInfo$Id: l3prop.dtx 4092 2012-08-14 14:04:41Z bruno $ {L3 Property lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \__expl_package_check: \quark_new:N \q__prop \tl_const:Nn \c_empty_prop { \q__prop } \cs_new_protected:Npn \prop_new:N #1 { \cs_new_eq:NN #1 \c_empty_prop } \cs_new_protected:Npn \prop_new:c #1 { \cs_new_eq:cN {#1} \c_empty_prop } \cs_new_protected:Npn \prop_clear:N #1 { \cs_set_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_clear:N { c } \cs_new_protected:Npn \prop_gclear:N #1 { \cs_gset_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_gclear:N { c } \cs_new_protected:Npn \prop_clear_new:N #1 { \prop_if_exist:NTF #1 { \prop_clear:N #1 } { \prop_new:N #1 } } \cs_generate_variant:Nn \prop_clear_new:N { c } \cs_new_protected:Npn \prop_gclear_new:N #1 { \prop_if_exist:NTF #1 { \prop_gclear:N #1 } { \prop_new:N #1 } } \cs_generate_variant:Nn \prop_gclear_new:N { c } \cs_new_eq:NN \prop_set_eq:NN \tl_set_eq:NN \cs_new_eq:NN \prop_set_eq:Nc \tl_set_eq:Nc \cs_new_eq:NN \prop_set_eq:cN \tl_set_eq:cN \cs_new_eq:NN \prop_set_eq:cc \tl_set_eq:cc \cs_new_eq:NN \prop_gset_eq:NN \tl_gset_eq:NN \cs_new_eq:NN \prop_gset_eq:Nc \tl_gset_eq:Nc \cs_new_eq:NN \prop_gset_eq:cN \tl_gset_eq:cN \cs_new_eq:NN \prop_gset_eq:cc \tl_gset_eq:cc \prop_new:N \l_tmpa_prop \prop_new:N \l_tmpb_prop \prop_new:N \g_tmpa_prop \prop_new:N \g_tmpb_prop \cs_new_protected:Npn \__prop_split:NnTF #1#2 { \exp_args:NNo \__prop_split_aux:NnTF #1 { \tl_to_str:n {#2} } } \cs_new_protected:Npn \__prop_split_aux:NnTF #1#2 { \cs_set_protected:Npn \__prop_split_aux:w ##1 \q__prop #2 \q__prop ##2 ##3 ##4 \q_mark ##5 \q_stop { \__prop_split_aux:nnnn ##3 { {##1 \q__prop } {##2} {##4} } } \exp_after:wN \__prop_split_aux:w #1 \q_mark \q__prop #2 \q__prop { } { ? \use_ii:nn { } } \q_mark \q_stop } \cs_new:Npn \__prop_split_aux:nnnn #1#2#3#4 { #3 #2 } \cs_new_protected:Npn \__prop_split_aux:w { } \cs_new_protected:Npn \prop_remove:Nn #1#2 { \__prop_split:NnTF #1 {#2} { \__prop_remove:NNnnn \tl_set:Nn #1 } { } } \cs_new_protected:Npn \prop_gremove:Nn #1#2 { \__prop_split:NnTF #1 {#2} { \__prop_remove:NNnnn \tl_gset:Nn #1 } { } } \cs_new_protected:Npn \__prop_remove:NNnnn #1#2#3#4#5 { #1 #2 { #3 #5 } } \cs_generate_variant:Nn \prop_remove:Nn { NV } \cs_generate_variant:Nn \prop_remove:Nn { c , cV } \cs_generate_variant:Nn \prop_gremove:Nn { NV } \cs_generate_variant:Nn \prop_gremove:Nn { c , cV } \cs_new_protected:Npn \prop_get:NnN #1#2#3 { \__prop_split:NnTF #1 {#2} { \__prop_get:Nnnn #3 } { \tl_set:Nn #3 { \q_no_value } } } \cs_new_protected:Npn \__prop_get:Nnnn #1#2#3#4 { \tl_set:Nn #1 {#3} } \cs_generate_variant:Nn \prop_get:NnN { NV , No } \cs_generate_variant:Nn \prop_get:NnN { c , cV , co } \cs_new_protected:Npn \prop_pop:NnN #1#2#3 { \__prop_split:NnTF #1 {#2} { \__prop_pop:NNNnnn \tl_set:Nn #1 #3 } { \tl_set:Nn #3 { \q_no_value } } } \cs_new_protected:Npn \prop_gpop:NnN #1#2#3 { \__prop_split:NnTF #1 {#2} { \__prop_pop:NNNnnn \tl_gset:Nn #1 #3 } { \tl_set:Nn #3 { \q_no_value } } } \cs_new_protected:Npn \__prop_pop:NNNnnn #1#2#3#4#5#6 { \tl_set:Nn #3 {#5} #1 #2 { #4 #6 } } \cs_generate_variant:Nn \prop_pop:NnN { No } \cs_generate_variant:Nn \prop_pop:NnN { c , co } \cs_generate_variant:Nn \prop_gpop:NnN { No } \cs_generate_variant:Nn \prop_gpop:NnN { c , co } \prg_new_protected_conditional:Npnn \prop_pop:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} { \__prop_pop_true:NNNnnn \tl_set:Nn #1 #3 } { \prg_return_false: } } \prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} { \__prop_pop_true:NNNnnn \tl_gset:Nn #1 #3 } { \prg_return_false: } } \cs_new_protected:Npn \__prop_pop_true:NNNnnn #1#2#3#4#5#6 { \tl_set:Nn #3 {#5} #1 #2 { #4 #6 } \prg_return_true: } \cs_generate_variant:Nn \prop_pop:NnNT { c } \cs_generate_variant:Nn \prop_pop:NnNF { c } \cs_generate_variant:Nn \prop_pop:NnNTF { c } \cs_generate_variant:Nn \prop_gpop:NnNT { c } \cs_generate_variant:Nn \prop_gpop:NnNF { c } \cs_generate_variant:Nn \prop_gpop:NnNTF { c } \cs_new_protected:Npn \prop_put:Nnn { \__prop_put:NNNnn \tl_set:Nx \tl_put_right:Nx } \cs_new_protected:Npn \prop_gput:Nnn { \__prop_put:NNNnn \tl_gset:Nx \tl_gput_right:Nx } \cs_new_protected:Npn \__prop_put:NNNnn #1#2#3#4#5 { \__prop_split:NnTF #3 {#4} { \__prop_put:NNnnnnn #1 #3 {#4} {#5} } { #2 #3 { \tl_to_str:n {#4} \exp_not:n { \q__prop {#5} \q__prop } } } } \cs_new_protected:Npn \__prop_put:NNnnnnn #1#2#3#4#5#6#7 { #1 #2 { \exp_not:n {#5} \tl_to_str:n {#3} \exp_not:n { \q__prop {#4} \q__prop } \exp_not:n {#7} } } \cs_generate_variant:Nn \prop_put:Nnn { NnV , Nno , Nnx , NV , NVV , No , Noo } \cs_generate_variant:Nn \prop_put:Nnn { c , cnV , cno , cnx , cV , cVV , co , coo } \cs_generate_variant:Nn \prop_gput:Nnn { NnV , Nno , Nnx , NV , NVV , No , Noo } \cs_generate_variant:Nn \prop_gput:Nnn { c , cnV , cno , cnx , cV , cVV , co , coo } \cs_new_protected_nopar:Npn \prop_put_if_new:Nnn { \__prop_put_if_new:NNnn \tl_put_right:Nx } \cs_new_protected_nopar:Npn \prop_gput_if_new:Nnn { \__prop_put_if_new:NNnn \tl_gput_right:Nx } \cs_new_protected:Npn \__prop_put_if_new:NNnn #1#2#3#4 { \__prop_split:NnTF #2 {#3} { \use_none:nnn } { #1 #2 { \tl_to_str:n {#3} \exp_not:n { \q__prop {#4} \q__prop } } } } \cs_generate_variant:Nn \prop_put_if_new:Nnn { c } \cs_generate_variant:Nn \prop_gput_if_new:Nnn { c } \cs_new_eq:NN \prop_if_exist:NTF \cs_if_exist:NTF \cs_new_eq:NN \prop_if_exist:NT \cs_if_exist:NT \cs_new_eq:NN \prop_if_exist:NF \cs_if_exist:NF \cs_new_eq:NN \prop_if_exist_p:N \cs_if_exist_p:N \cs_new_eq:NN \prop_if_exist:cTF \cs_if_exist:cTF \cs_new_eq:NN \prop_if_exist:cT \cs_if_exist:cT \cs_new_eq:NN \prop_if_exist:cF \cs_if_exist:cF \cs_new_eq:NN \prop_if_exist_p:c \cs_if_exist_p:c \prg_new_conditional:Npnn \prop_if_empty:N #1 { p, T , F , TF } { \if_meaning:w #1 \c_empty_prop \prg_return_true: \else: \prg_return_false: \fi: } \cs_generate_variant:Nn \prop_if_empty_p:N {c} \cs_generate_variant:Nn \prop_if_empty:NTF {c} \cs_generate_variant:Nn \prop_if_empty:NT {c} \cs_generate_variant:Nn \prop_if_empty:NF {c} \prg_new_conditional:Npnn \prop_if_in:Nn #1#2 { p , T , F , TF } { \exp_last_unbraced:Noo \__prop_if_in:nwn { \tl_to_str:n {#2} } #1 \tl_to_str:n {#2} \q__prop { } \q_recursion_tail % could be any cs != \q__prop \__prg_break_point: } \cs_new:Npn \__prop_if_in:nwn #1 \q__prop #2 \q__prop #3 { \str_if_eq_x:nnTF {#1} {#2} { \__prop_if_in:N } { \__prop_if_in:nwn {#1} } } \cs_new:Npn \__prop_if_in:N #1 { \if_meaning:w \q__prop #1 \prg_return_true: \else: \prg_return_false: \fi: \__prg_break: } \cs_generate_variant:Nn \prop_if_in_p:Nn { NV , No } \cs_generate_variant:Nn \prop_if_in_p:Nn { c , cV , co } \cs_generate_variant:Nn \prop_if_in:NnT { NV , No } \cs_generate_variant:Nn \prop_if_in:NnT { c , cV , co } \cs_generate_variant:Nn \prop_if_in:NnF { NV , No } \cs_generate_variant:Nn \prop_if_in:NnF { c , cV , co } \cs_generate_variant:Nn \prop_if_in:NnTF { NV , No } \cs_generate_variant:Nn \prop_if_in:NnTF { c , cV , co } \prg_new_protected_conditional:Npnn \prop_get:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} { \__prop_get_true:Nnnn #3 } { \prg_return_false: } } \cs_new_protected:Npn \__prop_get_true:Nnnn #1#2#3#4 { \tl_set:Nn #1 {#3} \prg_return_true: } \cs_generate_variant:Nn \prop_get:NnNT { NV , No } \cs_generate_variant:Nn \prop_get:NnNF { NV , No } \cs_generate_variant:Nn \prop_get:NnNTF { NV , No } \cs_generate_variant:Nn \prop_get:NnNT { c , cV , co } \cs_generate_variant:Nn \prop_get:NnNF { c , cV , co } \cs_generate_variant:Nn \prop_get:NnNTF { c , cV , co } \cs_new:Npn \prop_map_function:NN #1#2 { \exp_last_unbraced:NNo \__prop_map_function:Nwn #2 #1 \q_recursion_tail \q__prop { } \__prg_break_point:Nn \prop_map_break: { } } \cs_new:Npn \__prop_map_function:Nwn #1 \q__prop #2 \q__prop #3 { \__quark_if_recursion_tail_break:nN {#2} \prop_map_break: #1 {#2} {#3} \__prop_map_function:Nwn #1 } \cs_generate_variant:Nn \prop_map_function:NN { Nc } \cs_generate_variant:Nn \prop_map_function:NN { c , cc } \cs_new_protected:Npn \prop_map_inline:Nn #1#2 { \int_gincr:N \g__prg_map_int \cs_gset:cpn { __prg_map_ \int_use:N \g__prg_map_int :w } ##1##2 {#2} \exp_last_unbraced:Nco \__prop_map_function:Nwn { __prg_map_ \int_use:N \g__prg_map_int :w } #1 \q_recursion_tail \q__prop { } \__prg_break_point:Nn \prop_map_break: { \int_gdecr:N \g__prg_map_int } } \cs_generate_variant:Nn \prop_map_inline:Nn { c } \cs_new_nopar:Npn \prop_map_break: { \__prg_map_break:Nn \prop_map_break: { } } \cs_new_nopar:Npn \prop_map_break:n { \__prg_map_break:Nn \prop_map_break: } \cs_new_protected:Npn \prop_show:N #1 { \__msg_show_variable:Nnx #1 { prop } { \prop_map_function:NN #1 \__msg_show_item:nn } } \cs_generate_variant:Nn \prop_show:N { c } \cs_new_eq:NN \prop_del:Nn \prop_remove:Nn \cs_new_eq:NN \prop_del:NV \prop_remove:NV \cs_new_eq:NN \prop_del:cn \prop_remove:cn \cs_new_eq:NN \prop_del:cV \prop_remove:cV \cs_new_eq:NN \prop_gdel:Nn \prop_gremove:Nn \cs_new_eq:NN \prop_gdel:NV \prop_gremove:NV \cs_new_eq:NN \prop_gdel:cn \prop_gremove:cn \cs_new_eq:NN \prop_gdel:cV \prop_gremove:cV %% %% %% End of file `l3prop.sty'.