summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/expl3/l3prop.dtx
blob: e430507aabf48aab5779fb42d943b32697d10a54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
% \iffalse
%% File: l3prop.dtx Copyright (C) 1990-1998 LaTeX3 project
%
%<*dtx>
          \ProvidesFile{l3prop.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{l3prop}
%<driver> \ProvidesFile{l3prop.drv}
% \fi
%         \ProvidesFile{l3prop.dtx}
          [1998/05/04 v1.0e L3 Experimental Property Lists]
%
% \iffalse
%<*driver>
\documentclass{l3doc}

\begin{document}
\DocInput{l3prop.dtx}
\end{document}
%</driver>
% \fi
%
%
% \GetFileInfo{l3prop.dtx}
% \title{The \textsf{l3prop} package\thanks{This file
%         has version number \fileversion, last
%         revised \filedate.}\\
% Property Lists}
% \author{\Team}
% \date{\filedate}
% \maketitle
%
%
%
% \section{Property lists}
% 
%  \LaTeX3 implements a data structure which allows to store information
% associated with individual tokens.
% 
% \subsection{Functions}
% 
% \begin{function}{%
%                  \prop_new:N |
%                  \prop_new:O |
% }
% \begin{syntax}
%    "\prop_new:N" <plist>
% \end{syntax}
% Defines <plist> to be a variable of type p-list.
% \end{function}
% 
% \begin{function}{%
%                  \prop_clear:N |
%                  \prop_gclear:N |
% }
% \begin{syntax}
%   "\prop_clear:N"  <plist>
% \end{syntax}
% These functions locally or globally clear <plist>.
% \end{function}
% 
% \begin{function}{%
%                  \prop_put:NNn |
%                  \prop_gput:NNn |
%                  \prop_gput:NNo |
%                  \prop_gput:NOo |
%                  \prop_gput:OOo |
%                  \prop_gput:NOx |
%                  \prop_gput:ccn |
%                  \prop_gput:ccx |
% }
% \begin{syntax}
%   "\prop_put:NNn" <plist> <key> "{"<token list>"}"
% \end{syntax}
% Locally or globally associates <token list> with <key> in the p-list
% <plist>. If <key> has already a meaning within <plist> this value is
% overwritten.
% \end{function}
% 
% \begin{function}{%
%                  \prop_gput_if_new:NNn |
% }
% \begin{syntax}
%   "\prop_gput_if_new:NNn" <plist> <key> "{"<token list>"}"
% \end{syntax}
%  Globally associates <token list> with <key> in the p-list
% <plist> but only if <key> has so far no meaning within <plist>.
% overwritten.
% \end{function}
% 
% \begin{function}{%
%                  \prop_get:NNN |
%                  \prop_gget:NNN |
% }
% \begin{syntax}
%    "\prop_get:NNN" <plist> <key> <tlp>
% \end{syntax}
% If <info> is the information associated with <key> in the p-list
% <plist> then the token list pointer <tlp> gets <info> assigned.
% Otherwise its value is the special quark "\q_no_value".
%^^A See section \ref{sec:quarks} to test this.
% The assignment is done either locally or globally.
% \end{function}
% 
% \begin{function}{%
%                  \prop_set_eq:NN
% }
% \begin{syntax}
%    "\prop_set_eq:NN" <plist 1> <plist 2>
% \end{syntax}
% A fast assignment of <plist>s.
% \end{function}
% 
% \begin{function}{%
%                  \prop_get_gdel:NNN |
% }
% \begin{syntax}
%    "\prop_get_gdel:NNN" <plist> <key> <tlp>
% \end{syntax}
% Like "\prop_get:NNN" but additionally removes <key> (and its <info>)
% from <plist>.
% \end{function}
% 
% \begin{function}{%
%                  \prop_del:NN |
%                  \prop_gdel:NN |
% }
% \begin{syntax}
%    "\prop_del:NN" <plist> <key>
% \end{syntax}
% Locally or globally deletes <key> and its <info> from <plist> if
% found. Otherwise does nothing.
% \end{function}
% 
% \begin{function}{\prop_map:NN |
%                  \prop_map:cN
% }
% \begin{syntax}
%   "\prop_map:NN" <plist> <function>
% \end{syntax}
% Maps <function> which should be a function with two arguments (<key>
% and <info>) over every <key> <info> pair of <plist>.
% \end{function}
% 
% \begin{function}{\prop_map_inline:Nn |
%                  \prop_map_inline:cn
% }
% \begin{syntax}
%   "\prop_map_inline:Nn" <plist> "{" <inline function> "}"
% \end{syntax}
% Just like "\prop_map:NN" but with the function of two arguments
% supplied as inline code.  Within <inline function> refer to the
% arguments via "##1" (<key>) and "##2" (<info>).
% 
% Not implemented so far!
% \end{function}
% 
% \subsection{Predicates and conditionals}
% 
% \begin{function}{\prop_empty:NTF}
% \begin{syntax}
%   "\prop_empty:NTF" <plist> "{"<true code>"}{"<false code>"}"
% \end{syntax}
% Set of conditionals that test whether or not a particular <plist>
% is empty.
% \end{function}
% 
% \begin{function}{%
%                  \prop_if_in:NNTF |
%                  \prop_if_in:NOTF |
% }
% \begin{syntax}
%   "\prop_if_in:NNTF" <plist><key>"{"<true code>"}{"<false code>"}"
% \end{syntax}
% Tests if <key> is used in <plist> and then either executes <true code>
% or <false code>.
% \end{function}
% 
% \subsection{Internal functions}
% 
% \begin{function}{%
%                  \prop_put_aux:w |
%                  \prop_put_if_new_aux:w |
% }
% Internal functions implementing the put operations.
% \end{function}
% 
% \begin{function}{%
%                  \prop_get_aux:w |
%                  \prop_get_del_aux:w |
%                  \prop_del_aux:w |
% }
% Internal functions implementing the get and delete operations.
% \end{function}
% 
% \begin{function}{%
%                  \prop_if_in_aux:w |
% }
% Internal function implementing the key test operation.
% \end{function}
% 
% \begin{function}{%
%                  \prop_map_aux:w |
% }
% Internal function implementing the map operation.
% \end{function}
% 
% \begin{function}{%
%                  \prop_map_funct:Nn |
% }
% Internal name for the function that is mapped over p-list during
% execution of "\prop_map:NN".
% \end{function}
% 
% \begin{function}{\prop_split_aux:NNn}
% \begin{syntax}
%   "\prop_split_aux:NNn" <plist> <key> <cmd>
% \end{syntax}
% Internal function that invokes <cmd> with 3 arguments: 1st is the
% beginning of <plist> before <key>, 2nd is the value associated with
% <key>, 3rd is the rest of <plist> after <key>.  If there is no key
% <key> in <plist>, then the 2 arg is "\q_no_value " and the 3rd arg is
% empty; otherwise the 3rd argument has the two extra tokens <prop>
% "\q_no_value" at the end.
% 
% This function is used to implement various get operations.
% \end{function}
% 
% 
% \section {Implementation}
%
%    We start by ensuring that the required packages are loaded.
%    \begin{macrocode}
%<package>\RequirePackage{l3seq}\par
%<*package>
%    \end{macrocode}
%    
% A property list is a control sequence whose top-level expansion is
% of the form `\zz{tok$\sb1$}\zv{val$\sb1$} \ldots{}
% \zz{tok$\sb{}n$}\zv{val$\sb{}n$}'. The properties have to be single
% token, the values might be arbitrary token lists they get surrounded
% by braces.
%
% To get values from property-lists, token lists should be passed to
% the appropriate functions.
%
% \begin{macro}{\prop_new:N}
% \begin{macro}{\prop_new:O}
% \begin{macro}{\prop_new:c}
%    Property lists are a special case of sequences, so allocating
%    them is the same as allocating sequences.
%    \begin{macrocode}
\let_new:NN \prop_new:N \seq_new:N
\let_new:NN \prop_new:O \seq_new:O
\let_new:NN \prop_new:c \seq_new:c
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_clear:N}
% \begin{macro}{\prop_gclear:N}
%    The same goes for clearing a property list, either
%    locally or globally.
%    \begin{macrocode}
\let_new:NN \prop_clear:N \seq_clear:N
\let_new:NN \prop_gclear:N \seq_gclear:N
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_split_aux:NNn}
%   |\prop_split_aux:NNn|\zz{plist}\zz{prop}\zz{cmd} invokes \zz{cmd}
%   with 3 arguments: 1st is the beginning of \zz{plist} before
%   \zz{prop}, 2nd is the value associated with \zz{prop}, 3rd is the
%   rest of \zz{plist} after \zz{prop}.  If there is no property
%   \zz{prop} in \zz{plist}, then the 2nd argument will be |\q_no_value|
%   and the 3rd argument is empty; otherwise the 3rd argument has the two
%   extra tokens \zz{prop} |\q_no_value| at the end.
%    \begin{macrocode}
\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 #1#2\q_no_value \q_stop}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\prop_get:NNN}
% \begin{macro}{\prop_get_aux:w}
%    |\prop_get:NNN |\zz{plist}\zz{prop}\zz{tlp} defines
%    \zz{tlp} to be the value associated with \zz{prop} in \zz{plist},
%    |\q_no_value| if not found.
%    \begin{macrocode}
\def_long_new:Npn \prop_get:NNN #1#2{\prop_split_aux:NNn
                                    #1#2\prop_get_aux:w}
\def_long_new:Npn \prop_get_aux:w #1#2#3#4{\tlp_set:Nn#4{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_gget:NNN}
% \begin{macro}{\prop_gget_aux:w}
%    The global version of the previous function.
%    \begin{macrocode}
\def_long_new:Npn \prop_gget:NNN #1#2{\prop_split_aux:NNn
                                    #1#2\prop_gget_aux:w}
\def_long_new:Npn \prop_gget_aux:w #1#2#3#4{\tlp_gset:Nn#4{#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_get_gdel:NNN}
% \begin{macro}{\prop_get_del_aux:w}
%    |\prop_get_gdel:NNN| is the same as |\prop_get:NNN| but the
%    \m{property_key} and its value are afterwards globally removed
%    from \m{property_list}. One probably also needs the local
%    variants or only the local one, or\ldots\ We decide this later.
%    \begin{macrocode}
\def_long_new:Npn \prop_get_gdel:NNN #1#2#3{\prop_split_aux:NNn
            #1#2{\prop_get_del_aux:w #3{\tlp_gset:Nn #1}#2}}
\def_long_new:Npn \prop_get_del_aux:w #1#2#3#4#5#6{
  \tlp_set:Nn #1{#5}
  \quark_if_no_value:NF#1
    {\def:Npn \tmp:w ##1#3\q_no_value {#2{#4##1}}
     \tmp:w #6}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_put:NNn}
% \begin{macro}{\prop_put_aux:w}
% \begin{macro}{\prop_gput:NNn}
% \begin{macro}{\prop_gput:NNx}
% \begin{macro}{\prop_gput:NNo}
% \begin{macro}{\prop_gput:NOx}
% \begin{macro}{\prop_gput:NOo}
% \begin{macro}{\prop_gput:OOo}
% \begin{macro}{\prop_gput:ccx}
%    |\prop_put:NNn |\zz{plist}\zz{prop}\zv{val} adds/changes the
%    value associated with \zz{prop} in \zz{plist} to \zv{val}.
%    \begin{macrocode}
\def_long_new:Npn \prop_put:NNn #1#2{\prop_split_aux:NNn
                                #1#2{\prop_put_aux:w {\tlp_set:Nn #1}#2}}
\def_long_new:Npn \prop_gput:NNn #1#2{\prop_split_aux:NNn
                                #1#2{\prop_put_aux:w {\tlp_gset:Nn #1}#2}}
\def_new:Npn \prop_gput:NNo {\exp_args:NNNo \prop_gput:NNn}
\def_new:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
\def_new:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
\def_new:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
\def_new:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
\def_new:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
\def_new:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
\def_long_new:Npn \prop_put_aux:w #1#2#3#4#5#6{
  \quark_if_no_value:nTF {#4}
    {#1{#2{#6}#3}}
    {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3#2{#6}##1}}
     \tmp:w #5}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_del:NN}
% \begin{macro}{\prop_gdel:NN}
% \begin{macro}{\prop_del_aux:w}
%    |\prop_del:NN |\zz{plist}\zz{prop} deletes the entry for
%    \zz{prop} in \zz{plist}, if any.
%    \begin{macrocode}
\def_long_new:Npn \prop_del:NN #1#2{\prop_split_aux:NNn
                                #1#2{\prop_del_aux:w {\tlp_set:Nn #1}#2}}
\def_long_new:Npn \prop_gdel:NN #1#2{\prop_split_aux:NNn
                                #1#2{\prop_del_aux:w {\tlp_gset:Nn #1}#2}}
\def_long_new:Npn \prop_del_aux:w #1#2#3#4#5{\quark_if_no_value:nF {#4}
%    \end{macrocode}
%    I see no reason for updating the property list if we don't find
%    any entry.
%    \begin{macrocode}
%  {#1{#3}}
   {\def:Npn \tmp:w ##1#2\q_no_value {#1{#3##1}}\tmp:w #5}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
% \begin{macro}{\prop_if_in:NNTF}
% \begin{macro}{\prop_if_in:NOTF}
% \begin{macro}{\prop_if_in_aux:w}
%    |\prop_if_in:NNTF| \m{property_list} \m{property_key}
%    \m{true_case} \m{false_case} will check whether or not
%    \m{property_key} is on the \m{property_list} and then select
%    either the true or false case.
%    \begin{macrocode}
\def_new:Npn \prop_if_in:NNTF #1#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_aux:w #1#2#3{\quark_if_no_value:nTF {#2}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\prop_gput_if_new:NNn}
%    |\prop_gput_if_new:NNn| \m{property_list} \m{property_key}
%    \m{property_value} is equivalent to
%    \begin{tabbing}
%       xxxxx\=xxxxx\= \kill
%       |\prop_if_in:NNTF |\m{property}\m{property_key} \\
%       \> |{}%| \\
%       \> |{\prop_gput:NNn| \\
%       \>\> \m{property_list} \\
%       \>\> \m{property_key} \\
%       \>\> \m{property_value}|}|
%     \end{tabbing}
%    Here we go (listening to Porgy \& Bess in a recording with Ella
%    F. and Louis A. which makes writing macros sometimes difficult; I
%    find myself humming instead of working):
%    \begin{macrocode}
\def_long_new:Npn \prop_gput_if_new:NNn #1#2{\prop_split_aux:NNn #1#2
        {\prop_put_if_new_aux:w #1#2}}
\def_long_new:Npn \prop_put_if_new_aux:w #1#2#3#4#5#6{
  \quark_if_no_value:nT {#4}{#1{#2{#6}#3}}}
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\prop_set_eq:NN}
%    This makes two \m{plist}s have the same contents.
%    \begin{macrocode}
\let_new:NN\prop_set_eq:NN\tlp_set_eq:NN
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\prop_empty:NTF}
%    This conditional takes a \m{plist} as its argument and evaluates
%    either the true or the false case, depending on whether or not
%    \m{plist} contains any properties.
%    \begin{macrocode}
\let_new:NN \prop_empty:NTF \tlp_empty:NTF
%    \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\prop_map:NN}
% \begin{macro}{\prop_map:cN}
% \begin{macro}{\prop_map_funct:Nn}
%    Maps a function on every entry in the property list.  The
%    function must take 2 arguments: a key and a value.
%    \begin{macrocode}
\let_new:NN \prop_map_funct:Nn \use_none:nn
\def_new:Npn \prop_map:NN #1#2{
  \let:NN \prop_map_funct:Nn #2
  \exp_after:NN\prop_map_aux:w #1\q_stop \q_stop}
\def_new:Npn \prop_map_aux:w #1#2{
  \if_meaning:NN#1\q_stop \else:
    \prop_map_funct:Nn #1{#2}
    \exp_after:NN\prop_map_aux:w
  \fi:}
\def_new:Npn \prop_map:cN { \exp_args:Nc \prop_map:NN }
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%  \begin{macro}{\prop_map_inline:Nn}
%  \begin{macro}{\prop_map_inline:cn}
%    To be supplied.
%    \begin{macrocode}
\let_new:NN \prop_map_inline:Nn \ERROR
\let_new:NN \prop_map_inline:cn \ERROR
%    \end{macrocode}
%  \end{macro}
%  \end{macro}
%
%    Show token usage:
%    \begin{macrocode}
%</package>
%<*showmemory>
%\showMemUsage
%</showmemory>
%    \end{macrocode}
%
%
%
%    \begin{macrocode}
%<*unused>
\file_input_stop:
%    \end{macrocode}
%
%
% \section {Properties}
%
%
% This is the version that uses individual pointers to hold the values.
% maybe we need both?
% It is currently disabled because it does not work with the
% implementation of the mark mechanism.
%
% A property list is a control sequence whose top_level expansion is
% of the form `\zz{tok$\sb1$}\zv{val$\sb1$} \ldots{}
% \zz{tok$\sb{}n$}\zv{val$\sb{}n$}'. The properties have to be single token,
% the values might be arbitrary token lists they get surrounded by
% braces.
%
% To get values from property_lists token_lists should be passed to
% the appropriate functions.
%
%
% \begin{macro}{\prop_split_aux:NNn}
%    |\prop_split_aux:NNn|\zz{plist}\zz{prop}\zz{cmd} invokes \zz{cmd}
%    with 3 arguments: 1st is the beginning of \zz{plist} before
%    \zz{prop}, 2nd is the value associated with \zz{prop}, 3rd is the
%    rest of \zz{plist} after \zz{prop}.  If there is no property
%    \zz{prop} in \zz{plist}, then the 2 arg is |\q_no_value | and
%    the 3rd arg is empty; otherwise the 3rd argument has the two
%    extra tokens \zz{prop} |\q_no_value| at the end.
%    \begin{macrocode}
\def_long: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 #1#2\q_no_value \q_stop}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\prop_get:NNN}
% \begin{macro}{\prop_get_aux:w}
%    |\prop_get:NNN |\zz{plist}\zz{prop}\zz{tlp} defines
%    command to be the value associated with \zz{prop} in \zz{plist},
%    |\q_no_value| if not found.
%    \begin{macrocode}
\def_long:Npn \prop_get:NNN #1#2{\prop_split_aux:NNn
                                    #1#2\prop_get_aux:w}
\def_long:Npn \prop_get_aux:w #1#2#3#4{\tlp_set_eq:NN#4#2}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%
% \begin{macro}{\prop_put:NNn}
% \begin{macro}{\prop_put_aux:w}
% \begin{macro}{\prop_gput:NNn}
% \begin{macro}{\prop_gput:NNx}
% \begin{macro}{\prop_gput:NNo}
% \begin{macro}{\prop_gput:NOx}
% \begin{macro}{\prop_gput:NOo}
% \begin{macro}{\prop_gput:OOo}
% \begin{macro}{\prop_gput:ccx}
%    |\prop_put:NNn |\zz{plist}\zz{prop}\zv{val} adds/changes the
%    value associated with \zz{prop} in \zz{plist} to \zv{val}.
%    \begin{macrocode}
\def_long:Npn \prop_put:NNn #1#2{\prop_split_aux:NNn
                                #1#2{\prop_put_aux:w \tlp_set:Nn #1#2}}
\def_long:Npn \prop_gput:NNn #1#2{\prop_split_aux:NNn
                                #1#2{\prop_put_aux:w \tlp_gset:Nn #1#2}}
\def:Npn \prop_gput:NNo {\exp_args:Nnno \prop_gput:NNn}
\def:Npn \prop_gput:NOx {\exp_args:Nnox \prop_gput:NNn}
\def:Npn \prop_gput:NNx {\exp_args:Nnnx \prop_gput:NNn}
\def:Npn \prop_gput:NOo {\exp_args:NNOo \prop_gput:NNn}
\def:Npn \prop_gput:OOo {\exp_args:NOOo \prop_gput:NNn}
\def:Npn \prop_gput:ccn {\exp_args:Ncc \prop_gput:NNn}
\def:Npn \prop_gput:ccx {\exp_args:Nccx \prop_gput:NNn}
\def_long:Npn \prop_put_aux:w #1#2#3#4#5#6#7{
  \quark_if_no_value:nTF#5
    {
     \cs_ggen_sym:N\l_testa_tlp
     \exp_after:NN#1\exp_after:NN#2\exp_after:NN{\exp_after:NN#3\l_testa_tlp#4}
     \exp_after:NN\tlp_gset:Nn\l_testa_tlp
    }
    {#1#5}
  {#7}}
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
%    Show token usage:
%    \begin{macrocode}
%<*showmemory>
%\showMemUsage
%</showmemory>
%</unused>
%    \end{macrocode}
%