%% %% 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-2013 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 4623 2013-12-14 13:53:40Z bruno $ {L3 Property lists} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \__expl_package_check: \__scan_new:N \s__prop \cs_new:Npn \__prop_pair:wn #1 \s__prop #2 { \__msg_kernel_expandable_error:nn { kernel } { misused-prop } } \tl_new:N \l__prop_internal_tl \tl_const:Nn \c_empty_prop { \s__prop } \cs_new_protected:Npn \prop_new:N #1 { \__chk_if_free_cs:N #1 \cs_gset_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_new:N { c } \cs_new_protected:Npn \prop_clear:N #1 { \prop_set_eq:NN #1 \c_empty_prop } \cs_generate_variant:Nn \prop_clear:N { c } \cs_new_protected:Npn \prop_gclear:N #1 { \prop_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#3#4 { \cs_set:Npn \__prop_split_aux:w ##1 \__prop_pair:wn #2 \s__prop ##2 ##3 \q_mark ##4 ##5 \q_stop { ##4 {#3} {#4} } \exp_after:wN \__prop_split_aux:w #1 \q_mark \use_i:nn \__prop_pair:wn #2 \s__prop { } \q_mark \use_ii:nn \q_stop } \cs_new:Npn \__prop_split_aux:w { } \cs_new_protected:Npn \prop_remove:Nn #1#2 { \__prop_split:NnTF #1 {#2} { \tl_set:Nn #1 { ##1 ##3 } } { } } \cs_new_protected:Npn \prop_gremove:Nn #1#2 { \__prop_split:NnTF #1 {#2} { \tl_gset:Nn #1 { ##1 ##3 } } { } } \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} { \tl_set:Nn #3 {##2} } { \tl_set:Nn #3 { \q_no_value } } } \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} { \tl_set:Nn #3 {##2} \tl_set:Nn #1 { ##1 ##3 } } { \tl_set:Nn #3 { \q_no_value } } } \cs_new_protected:Npn \prop_gpop:NnN #1#2#3 { \__prop_split:NnTF #1 {#2} { \tl_set:Nn #3 {##2} \tl_gset:Nn #1 { ##1 ##3 } } { \tl_set:Nn #3 { \q_no_value } } } \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} { \tl_set:Nn #3 {##2} \tl_set:Nn #1 { ##1 ##3 } \prg_return_true: } { \prg_return_false: } } \prg_new_protected_conditional:Npnn \prop_gpop:NnN #1#2#3 { T , F , TF } { \__prop_split:NnTF #1 {#2} { \tl_set:Nn #3 {##2} \tl_gset:Nn #1 { ##1 ##3 } \prg_return_true: } { \prg_return_false: } } \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_nopar:Npn \prop_put:Nnn { \__prop_put:NNnn \tl_set:Nx } \cs_new_protected_nopar:Npn \prop_gput:Nnn { \__prop_put:NNnn \tl_gset:Nx } \cs_new_protected:Npn \__prop_put:NNnn #1#2#3#4 { \tl_set:Nn \l__prop_internal_tl { \exp_not:N \__prop_pair:wn \tl_to_str:n {#3} \s__prop { \exp_not:n {#4} } } \__prop_split:NnTF #2 {#3} { #1 #2 { \exp_not:n {##1} \l__prop_internal_tl \exp_not:n {##3} } } { #1 #2 { \exp_not:o {#2} \l__prop_internal_tl } } } \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_set:Nx } \cs_new_protected_nopar:Npn \prop_gput_if_new:Nnn { \__prop_put_if_new:NNnn \tl_gset:Nx } \cs_new_protected:Npn \__prop_put_if_new:NNnn #1#2#3#4 { \tl_set:Nn \l__prop_internal_tl { \exp_not:N \__prop_pair:wn \tl_to_str:n {#3} \s__prop \exp_not:n { {#4} } } \__prop_split:NnTF #2 {#3} { } { #1 #2 { \exp_not:o {#2} \l__prop_internal_tl } } } \cs_generate_variant:Nn \prop_put_if_new:Nnn { c } \cs_generate_variant:Nn \prop_gput_if_new:Nnn { c } \prg_new_eq_conditional:NNn \prop_if_exist:N \cs_if_exist:N { TF , T , F , p } \prg_new_eq_conditional:NNn \prop_if_exist:c \cs_if_exist:c { TF , T , F , p } \prg_new_conditional:Npnn \prop_if_empty:N #1 { p , T , F , TF } { \tl_if_eq:NNTF #1 \c_empty_prop \prg_return_true: \prg_return_false: } \cs_generate_variant:Nn \prop_if_empty_p:N { c } \cs_generate_variant:Nn \prop_if_empty:NT { c } \cs_generate_variant:Nn \prop_if_empty:NF { c } \cs_generate_variant:Nn \prop_if_empty:NTF { c } \prg_new_conditional:Npnn \prop_if_in:Nn #1#2 { p , T , F , TF } { \exp_last_unbraced:Noo \__prop_if_in:nwwn { \tl_to_str:n {#2} } #1 \__prop_pair:wn \tl_to_str:n {#2} \s__prop { } \q_recursion_tail \__prg_break_point: } \cs_new:Npn \__prop_if_in:nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { \str_if_eq_x:nnTF {#1} {#3} { \__prop_if_in:N } { \__prop_if_in:nwwn {#1} } } \cs_new:Npn \__prop_if_in:N #1 { \if_meaning:w \q_recursion_tail #1 \prg_return_false: \else: \prg_return_true: \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} { \tl_set:Nn #3 {##2} \prg_return_true: } { \prg_return_false: } } \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:Nwwn #2 #1 \__prop_pair:wn \q_recursion_tail \s__prop { } \__prg_break_point:Nn \prop_map_break: { } } \cs_new:Npn \__prop_map_function:Nwwn #1#2 \__prop_pair:wn #3 \s__prop #4 { \if_meaning:w \q_recursion_tail #3 \exp_after:wN \prop_map_break: \fi: #1 {#3} {#4} \__prop_map_function:Nwwn #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 { \cs_gset_eq:cN { __prg_map_ \int_use:N \g__prg_map_int :wn } \__prop_pair:wn \int_gincr:N \g__prg_map_int \cs_gset:Npn \__prop_pair:wn ##1 \s__prop ##2 {#2} #1 \__prg_break_point:Nn \prop_map_break: { \int_gdecr:N \g__prg_map_int \cs_gset_eq:Nc \__prop_pair:wn { __prg_map_ \int_use:N \g__prg_map_int :wn } } } \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:Nnn #1 { prop } { \prop_map_function:NN #1 \__msg_show_item:nn } } \cs_generate_variant:Nn \prop_show:N { c } %% %% %% End of file `l3prop.sty'.