Debian Codegraph @

texmf-dist/tex/latex/l3kernel/l3debug.def

raw
1 %%
2 %% This is file `l3debug.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% l3debug.dtx (with options: `def')
8 %%
9 %% Copyright (C) 1990-2026 The LaTeX Project
10 %%
11 %% It may be distributed and/or modified under the conditions of
12 %% the LaTeX Project Public License (LPPL), either version 1.3c of
13 %% this license or (at your option) any later version. The latest
14 %% version of this license is in the file:
15 %%
16 %% https://www.latex-project.org/lppl.txt
17 %%
18 %% This file is part of the "l3kernel bundle" (The Work in LPPL)
19 %% and all files in that bundle must be distributed together.
20 %%
21 %% File: l3debug.dtx
22 \ProvidesExplFile{l3debug.def}{2026-05-15}{}{L3 Debugging support}
23 \scan_new:N \s__debug_stop
24 \cs_new:Npn \__debug_use_i_delimit_by_s_stop:nw #1 #2 \s__debug_stop {#1}
25 \quark_new:N \q__debug_recursion_tail
26 \quark_new:N \q__debug_recursion_stop
27 \cs_new:Npn \__debug_use_none_delimit_by_q_recursion_stop:w
28 #1 \q__debug_recursion_stop { }
29 \__kernel_quark_new_test:N \__debug_if_recursion_tail_stop:N
30 \cs_gset_protected:Npn \debug_on:n #1
31 {
32 \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} }
33 {
34 \cs_if_exist_use:cF { __debug_ ##1 _on: }
35 { \msg_error:nnn { debug } { debug } {##1} }
36 }
37 }
38 \cs_gset_protected:Npn \debug_off:n #1
39 {
40 \exp_args:No \clist_map_inline:nn { \tl_to_str:n {#1} }
41 {
42 \cs_if_exist_use:cF { __debug_ ##1 _off: }
43 { \msg_error:nnn { debug } { debug } {##1} }
44 }
45 }
46 \cs_new_protected:Npn \__debug_all_on:
47 {
48 \debug_on:n
49 {
50 check-assertions ,
51 check-declarations ,
52 check-expressions ,
53 deprecation ,
54 log-functions ,
55 }
56 }
57 \cs_new_protected:Npn \__debug_all_off:
58 {
59 \debug_off:n
60 {
61 check-assertions ,
62 check-declarations ,
63 check-expressions ,
64 deprecation ,
65 log-functions ,
66 }
67 }
68 \tl_new:N \l__debug_suspended_tl { }
69 \cs_gset_protected:Npn \debug_suspend:
70 {
71 \tl_put_right:Nn \l__debug_suspended_tl { . }
72 \cs_set_eq:NN \__debug_suspended:T \use:n
73 }
74 \cs_gset_protected:Npn \debug_resume:
75 {
76 \__kernel_tl_set:Nx \l__debug_suspended_tl
77 { \tl_tail:N \l__debug_suspended_tl }
78 \tl_if_empty:NT \l__debug_suspended_tl
79 {
80 \cs_set_eq:NN \__debug_suspended:T \use_none:n
81 }
82 }
83 \cs_new_eq:NN \__debug_suspended:T \use_none:n
84 \cs_new_protected:cpn { __debug_check-assertions_on: }
85 {
86 \cs_set:Npn \debug_assert:nN ##1##2
87 {
88 \__debug_suspended:T \use_none:nnnn
89 \debug_assert:nNe
90 { ##1 }
91 ##2
92 { Assertion~failed:~\tl_to_str:n { ##2 } }
93 }
94 \cs_set:Npn \debug_assert:nn ##1##2
95 {
96 \__debug_suspended:T \use_none:nnnn
97 \debug_assert:nne
98 { ##1 }
99 { ##2 }
100 { Assertion~failed:~\tl_to_str:n { ##2 } }
101 }
102 \cs_set:Npn \debug_assert:nNn ##1##2##3
103 {
104 \__debug_suspended:T \use_none:nnn
105 \bool_if:NF ##2
106 {
107 \exp_args:Nne \__kernel_msg_expandable_error:nn
108 { ##3 }
109 { \msg_error_text:n { ##1 } }
110 }
111 }
112 \cs_set:Npn \debug_assert:nnn ##1##2##3
113 {
114 \__debug_suspended:T \use_none:nnn
115 \bool_if:nF { ##2 }
116 {
117 \exp_args:Nne \__kernel_msg_expandable_error:nn
118 { ##3 }
119 { \msg_error_text:n { ##1 } }
120 }
121 }
122 }
123 \cs_new_protected:cpn { __debug_check-assertions_off: }
124 {
125 \cs_set:Npn \debug_assert:nN ##1##2 { }
126 \cs_set:Npn \debug_assert:nn ##1##2 { }
127 \cs_set:Npn \debug_assert:nNn ##1##2##3 { }
128 \cs_set:Npn \debug_assert:nnn ##1##2##3 { }
129 }
130 \cs_new_protected:Npn \__kernel_chk_var_exist:N #1 { }
131 \cs_new_protected:Npn \__kernel_chk_cs_exist:N #1 { }
132 \cs_generate_variant:Nn \__kernel_chk_cs_exist:N { c }
133 \cs_new:Npn \__kernel_chk_flag_exist:NN { }
134 \cs_new_protected:Npn \__kernel_chk_var_local:N #1 { }
135 \cs_new_protected:Npn \__kernel_chk_var_global:N #1 { }
136 \cs_new_protected:Npn \__kernel_chk_var_scope:NN #1#2 { }
137 \cs_new_protected:cpn { __debug_check-declarations_on: }
138 {
139 \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1
140 {
141 \__debug_suspended:T \use_none:nnn
142 \cs_if_exist:NF ##1
143 {
144 \msg_error:nne { debug } { non-declared-variable }
145 { \token_to_str:N ##1 }
146 }
147 }
148 \cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1
149 {
150 \__debug_suspended:T \use_none:nnn
151 \cs_if_exist:NF ##1
152 {
153 \msg_error:nne { kernel } { command-not-defined }
154 { \token_to_str:N ##1 }
155 }
156 }
157 \cs_set:Npn \__kernel_chk_flag_exist:NN ##1##2
158 {
159 \__debug_suspended:T \use_iii:nnnn
160 \flag_if_exist:NTF ##2
161 { ##1 ##2 }
162 {
163 \msg_expandable_error:nnn { kernel } { bad-variable } {##2}
164 ##1 \l_tmpa_flag
165 }
166 }
167 \cs_set_protected:Npn \__kernel_chk_var_scope:NN
168 {
169 \__debug_suspended:T \use_none:nnn
170 \__debug_chk_var_scope_aux:NN
171 }
172 \cs_set_protected:Npn \__kernel_chk_var_local:N ##1
173 {
174 \__debug_suspended:T \use_none:nnnnn
175 \__kernel_chk_var_exist:N ##1
176 \__debug_chk_var_scope_aux:NN l ##1
177 }
178 \cs_set_protected:Npn \__kernel_chk_var_global:N ##1
179 {
180 \__debug_suspended:T \use_none:nnnnn
181 \__kernel_chk_var_exist:N ##1
182 \__debug_chk_var_scope_aux:NN g ##1
183 }
184 }
185 \cs_new_protected:cpn { __debug_check-declarations_off: }
186 {
187 \cs_set_protected:Npn \__kernel_chk_var_exist:N ##1 { }
188 \cs_set_protected:Npn \__kernel_chk_cs_exist:N ##1 { }
189 \cs_set:Npn \__kernel_chk_flag_exist:NN { }
190 \cs_set_protected:Npn \__kernel_chk_var_local:N ##1 { }
191 \cs_set_protected:Npn \__kernel_chk_var_global:N ##1 { }
192 \cs_set_protected:Npn \__kernel_chk_var_scope:NN ##1##2 { }
193 }
194 \cs_new_protected:Npn \__debug_chk_var_scope_aux:NN #1#2
195 { \exp_args:NNf \__debug_chk_var_scope_aux:Nn #1 { \cs_to_str:N #2 } }
196 \cs_new_protected:Npn \__debug_chk_var_scope_aux:Nn #1#2
197 {
198 \if:w _ \use_i:nn \__debug_use_i_delimit_by_s_stop:nw #2 ? ? \s__debug_stop
199 \exp_after:wN \__debug_chk_var_scope_aux:NNn
200 \__debug_use_i_delimit_by_s_stop:nw #2 ? \s__debug_stop
201 #1 {#2}
202 \else:
203 \exp_args:Nc \__debug_chk_var_scope_aux:NNn
204 { __debug_chk_/ #2 }
205 #1 {#2}
206 \fi:
207 }
208 \cs_new_protected:Npn \__debug_chk_var_scope_aux:NNn #1#2#3
209 {
210 \if:w #1 #2
211 \else:
212 \if:w #1 \scan_stop:
213 \cs_gset_nopar:Npn #1 {#2}
214 \else:
215 \msg_error:nneee { debug } { local-global }
216 {#1} {#2} { \iow_char:N \\ #3 }
217 \fi:
218 \fi:
219 }
220 \use:c { __debug_check-declarations_off: }
221 \cs_new_protected:cpn { __debug_log-functions_on: }
222 {
223 \cs_set_protected:Npn \__kernel_debug_log:e
224 { \__debug_suspended:T \use_none:nn \iow_log:e }
225 }
226 \cs_new_protected:cpn { __debug_log-functions_off: }
227 { \cs_set_protected:Npn \__kernel_debug_log:e { \use_none:n } }
228 \cs_new_protected:Npn \__kernel_debug_log:e { \use_none:n }
229 \cs_new_protected:cpn { __debug_check-expressions_on: }
230 {
231 \cs_set:Npn \__kernel_chk_expr:nNnN ##1##2
232 {
233 \__debug_suspended:T { ##1 \use_none:nnnnnnn }
234 \exp_after:wN \__debug_chk_expr_aux:nNnN
235 \exp_after:wN { \tex_the:D ##2 ##1 \scan_stop: }
236 ##2
237 }
238 }
239 \cs_new_protected:cpn { __debug_check-expressions_off: }
240 { \cs_set:Npn \__kernel_chk_expr:nNnN ##1##2##3##4 {##1} }
241 \cs_new:Npn \__kernel_chk_expr:nNnN #1#2#3#4 {#1}
242 \cs_new:Npn \__debug_chk_expr_aux:nNnN #1#2#3#4
243 {
244 \tl_if_empty:oF
245 {
246 \tex_romannumeral:D - 0
247 \exp_after:wN \use_none:n
248 \int_value:w #3 #2 #1 \scan_stop:
249 }
250 {
251 \msg_expandable_error:nnnn
252 { debug } { expr } {#4} {#1}
253 }
254 #1
255 }
256 \cs_new_protected:Npn \__debug_deprecation_on:
257 { \g__debug_deprecation_on_tl }
258 \cs_new_protected:Npn \__debug_deprecation_off:
259 { \g__debug_deprecation_off_tl }
260 \tl_new:N \l__debug_tmp_tl
261 \tl_new:N \l__debug_tmpa_tl
262 \tl_new:N \l__debug_tmpb_tl
263 \cs_new_protected:Npn \__debug_generate_parameter_list:NNN #1#2#3
264 {
265 \__kernel_tl_set:Nx \l__debug_tmp_tl
266 { \exp_last_unbraced:Nf \use_ii:nnn \cs_split_function:N #1 }
267 \__kernel_tl_set:Nx #2
268 { \exp_args:NV \__debug_build_parm_text:n \l__debug_tmp_tl }
269 \__kernel_tl_set:Nx #3
270 { \exp_args:NV \__debug_build_arg_list:n \l__debug_tmp_tl }
271 }
272 \cs_new:Npn \__debug_build_parm_text:n #1
273 {
274 \__debug_arg_list_from_signature:nNN { 1 } \c_false_bool #1
275 \q__debug_recursion_tail \q__debug_recursion_stop
276 }
277 \cs_new:Npn \__debug_build_arg_list:n #1
278 {
279 \__debug_arg_list_from_signature:nNN { 1 } \c_true_bool #1
280 \q__debug_recursion_tail \q__debug_recursion_stop
281 }
282 \cs_new:Npn \__debug_arg_list_from_signature:nNN #1 #2 #3
283 {
284 \__debug_if_recursion_tail_stop:N #3
285 \__debug_arg_check_invalid:N #3
286 \bool_if:NT #2 { \__debug_arg_if_braced:NT #3 { \use_none:n } }
287 \use:n { \c_hash_str \int_eval:n {#1} }
288 \exp_args:Nf \__debug_arg_list_from_signature:nNN
289 { \int_eval:n {#1+1} } #2
290 }
291 \cs_new:Npn \__debug_arg_check_invalid:N #1
292 {
293 \if:w w #1 \__debug_parm_terminate:w \else:
294 \if:w p #1 \__debug_parm_terminate:w \else:
295 \if:w T #1 \__debug_parm_terminate:w \else:
296 \if:w F #1 \__debug_parm_terminate:w \else:
297 \exp:w
298 \fi:
299 \fi:
300 \fi:
301 \fi:
302 \exp_end:
303 }
304 \cs_new:Npn \__debug_parm_terminate:w
305 { \exp_after:wN \__debug_use_none_delimit_by_q_recursion_stop:w \exp:w }
306 \prg_new_conditional:Npnn \__debug_arg_if_braced:N #1 { T }
307 { \exp_args:Nf \__debug_arg_if_braced:n { \__debug_get_base_form:N #1 } }
308 \cs_new:Npn \__debug_arg_if_braced:n #1
309 {
310 \if:w n #1 \prg_return_true: \else:
311 \if:w N #1 \prg_return_false: \else:
312 \msg_expandable_error:nnn
313 { debug } { bad-arg-type } {#1}
314 \fi:
315 \fi:
316 }
317 \msg_new:nnn { debug } { bad-arg-type }
318 { Wrong~argument~type~#1. }
319 \cs_new:Npn \__debug_get_base_form:N #1
320 {
321 \if:w n #1 \__debug_arg_return:N n \else:
322 \if:w N #1 \__debug_arg_return:N N \else:
323 \if:w c #1 \__debug_arg_return:N N \else:
324 \if:w o #1 \__debug_arg_return:N n \else:
325 \if:w V #1 \__debug_arg_return:N n \else:
326 \if:w v #1 \__debug_arg_return:N n \else:
327 \if:w f #1 \__debug_arg_return:N n \else:
328 \if:w e #1 \__debug_arg_return:N n \else:
329 \if:w x #1 \__debug_arg_return:N n \else:
330 \__debug_arg_return:N \scan_stop:
331 \fi:
332 \fi:
333 \fi:
334 \fi:
335 \fi:
336 \fi:
337 \fi:
338 \fi:
339 \fi:
340 \exp_stop_f:
341 }
342 \cs_new:Npn \__debug_arg_return:N #1
343 { \exp_after:wN #1 \exp:w \exp_end_continue_f:w }
344 \group_begin:
345 \cs_set_protected:Npn \__kernel_patch:nnn
346 {
347 \group_begin:
348 \char_set_catcode_other:N \#
349 \__kernel_patch_aux:nnn
350 }
351 \cs_set_protected:Npn \__kernel_patch_aux:nnn #1#2#3
352 {
353 \char_set_catcode_parameter:N \#
354 \char_set_catcode_space:N \ %
355 \tex_endlinechar:D -1 \scan_stop:
356 \tl_map_inline:nn {#3}
357 {
358 \cs_if_exist:cTF { __debug_ \cs_to_str:N ##1 }
359 { \__debug_add_to_debug_code:Nnn }
360 { \__debug_setup_debug_code:Nnn }
361 ##1 {#1} {#2}
362 }
363 \group_end:
364 }
365 \cs_set_protected:Npn \__debug_setup_debug_code:Nnn #1#2#3
366 {
367 \cs_gset_eq:cN { __debug_ \cs_to_str:N #1 } #1
368 \__debug_generate_parameter_list:NNN #1 \l__debug_tmpa_tl \l__debug_tmpb_tl
369 \exp_args:Ne \tex_scantokens:D
370 {
371 \tex_global:D \cs_prefix_spec:N #1
372 \tex_def:D \exp_not:N #1
373 \tl_use:N \l__debug_tmpa_tl
374 {
375 \tl_to_str:n {#2}
376 \exp_not:c { __debug_ \cs_to_str:N #1 }
377 \tl_use:N \l__debug_tmpb_tl
378 \tl_to_str:n {#3}
379 }
380 }
381 }
382 \cs_set_protected:Npn \__debug_add_to_debug_code:Nnn #1#2#3
383 {
384 \use:e
385 {
386 \cs_set:Npn \exp_not:N \__debug_tmp:w
387 ##1 \tl_to_str:n { macro: }
388 ##2 \tl_to_str:n { -> }
389 ##3 \c_backslash_str \tl_to_str:n { __debug_ }
390 \cs_to_str:N #1
391 ##4 \s__debug_stop
392 {
393 \exp_not:N \exp_args:Ne \exp_not:N \tex_scantokens:D
394 {
395 \tex_global:D ##1
396 \tex_def:D \exp_not:N #1 ##2
397 {
398 ##3 \tl_to_str:n {#2}
399 \c_backslash_str __debug_ \cs_to_str:N #1
400 ##4 \tl_to_str:n {#3}
401 }
402 }
403 }
404 }
405 \exp_after:wN \__debug_tmp:w \cs_meaning:N #1 \s__debug_stop
406 }
407 \cs_set_protected:Npn \__kernel_patch_weird:nnn
408 {
409 \group_begin:
410 \char_set_catcode_other:N \#
411 \__kernel_patch_weird_aux:nnn
412 }
413 \cs_set_protected:Npn \__kernel_patch_weird_aux:nnn #1#2#3
414 {
415 \char_set_catcode_parameter:N \#
416 \char_set_catcode_space:N \ %
417 \tex_endlinechar:D -1 \scan_stop:
418 \tl_map_inline:nn {#3}
419 { \__debug_patch_weird:Nnn ##1 {#1} {#2} }
420 \group_end:
421 }
422 \cs_set_protected:Npn \__debug_patch_weird:Nnn #1#2#3
423 {
424 \use:e
425 {
426 \tex_endlinechar:D -1 \scan_stop:
427 \exp_not:N \tex_scantokens:D
428 {
429 \tex_global:D \cs_prefix_spec:N #1
430 \tex_def:D \exp_not:N #1
431 \cs_parameter_spec:N #1
432 {
433 \tl_to_str:n {#2}
434 \cs_replacement_spec:N #1
435 \tl_to_str:n {#3}
436 }
437 }
438 }
439 }
440 \__kernel_patch:nnn
441 { \__kernel_chk_var_exist:N #2 }
442 { }
443 {
444 \bool_set_eq:NN
445 \bool_gset_eq:NN
446 \clist_set_eq:NN
447 \clist_gset_eq:NN
448 \fp_set_eq:NN
449 \fp_gset_eq:NN
450 \prop_set_eq:NN
451 \prop_gset_eq:NN
452 \seq_set_eq:NN
453 \seq_gset_eq:NN
454 \str_set_eq:NN
455 \str_gset_eq:NN
456 \tl_set_eq:NN
457 \tl_gset_eq:NN
458 }
459 \__kernel_patch:nnn
460 {
461 \__kernel_chk_var_exist:N #2
462 \__kernel_chk_var_exist:N #3
463 }
464 { }
465 {
466 \clist_concat:NNN
467 \clist_gconcat:NNN
468 \prop_concat:NNN
469 \prop_gconcat:NNN
470 \seq_concat:NNN
471 \seq_gconcat:NNN
472 \str_concat:NNN
473 \str_gconcat:NNN
474 \tl_concat:NNN
475 \tl_gconcat:NNN
476 }
477 \cs_gset_protected:Npn \__kernel_tl_set:Nx { \cs_set_nopar:Npe }
478 \cs_gset_protected:Npn \__kernel_tl_gset:Nx { \cs_gset_nopar:Npe }
479 \__kernel_patch:nnn
480 { \__kernel_chk_var_local:N #1 }
481 { }
482 {
483 \bool_set:Nn
484 \bool_set_eq:NN
485 \bool_set_true:N
486 \bool_set_false:N
487 \box_set_eq:NN
488 \box_set_eq_drop:NN
489 \box_set_to_last:N
490 \clist_clear:N
491 \clist_set_eq:NN
492 \dim_zero:N
493 \dim_set:Nn
494 \dim_set_eq:NN
495 \dim_add:Nn
496 \dim_sub:Nn
497 \fp_set_eq:NN
498 \int_zero:N
499 \int_set_eq:NN
500 \int_add:Nn
501 \int_sub:Nn
502 \int_incr:N
503 \int_decr:N
504 \int_set:Nn
505 \hbox_set:Nn
506 \hbox_set_to_wd:Nnn
507 \hbox_set:Nw
508 \hbox_set_to_wd:Nnw
509 \muskip_zero:N
510 \muskip_set:Nn
511 \muskip_add:Nn
512 \muskip_sub:Nn
513 \muskip_set_eq:NN
514 \prop_clear:N
515 \prop_concat:NNN
516 \prop_pop:NnN
517 \prop_pop:NnNT
518 \prop_pop:NnNF
519 \prop_pop:NnNTF
520 \prop_put:Nnn
521 \prop_put_if_not_in:Nnn
522 \prop_put_from_keyval:Nn
523 \prop_remove:Nn
524 \prop_set_eq:NN
525 \prop_set_from_keyval:Nn
526 \seq_set_eq:NN
527 \skip_zero:N
528 \skip_set:Nn
529 \skip_set_eq:NN
530 \skip_add:Nn
531 \skip_sub:Nn
532 \str_clear:N
533 \str_set_eq:NN
534 \str_put_left:Nn
535 \str_put_right:Nn
536 \__kernel_tl_set:Nx
537 \tl_clear:N
538 \tl_set_eq:NN
539 \tl_put_left:Nn
540 \tl_put_left:NV
541 \tl_put_left:Nv
542 \tl_put_left:Ne
543 \tl_put_left:No
544 \tl_put_right:Nn
545 \tl_put_right:NV
546 \tl_put_right:Nv
547 \tl_put_right:Ne
548 \tl_put_right:No
549 \tl_build_begin:N
550 \tl_build_put_right:Nn
551 \tl_build_put_left:Nn
552 \vbox_set:Nn
553 \vbox_set_top:Nn
554 \vbox_set_to_ht:Nnn
555 \vbox_set_top_to_ht:Nnn
556 \vbox_set:Nw
557 \vbox_set_to_ht:Nnw
558 \vbox_set_split_to_ht:NNn
559 }
560 \__kernel_patch:nnn
561 { \__kernel_chk_var_global:N #1 }
562 { }
563 {
564 \bool_gset:Nn
565 \bool_gset_eq:NN
566 \bool_gset_true:N
567 \bool_gset_false:N
568 \box_gset_eq:NN
569 \box_gset_eq_drop:NN
570 \box_gset_to_last:N
571 \cctab_gset:Nn
572 \clist_gclear:N
573 \clist_gset_eq:NN
574 \dim_gset_eq:NN
575 \dim_gzero:N
576 \dim_gset:Nn
577 \dim_gadd:Nn
578 \dim_gsub:Nn
579 \fp_gset_eq:NN
580 \int_gzero:N
581 \int_gset_eq:NN
582 \int_gadd:Nn
583 \int_gsub:Nn
584 \int_gincr:N
585 \int_gdecr:N
586 \int_gset:Nn
587 \hbox_gset:Nn
588 \hbox_gset_to_wd:Nnn
589 \hbox_gset:Nw
590 \hbox_gset_to_wd:Nnw
591 \muskip_gzero:N
592 \muskip_gset:Nn
593 \muskip_gadd:Nn
594 \muskip_gsub:Nn
595 \muskip_gset_eq:NN
596 \prop_gclear:N
597 \prop_gconcat:NNN
598 \prop_gpop:NnN
599 \prop_gpop:NnNT
600 \prop_gpop:NnNF
601 \prop_gpop:NnNTF
602 \prop_gput:Nnn
603 \prop_gput_if_not_in:Nnn
604 \prop_gput_from_keyval:Nn
605 \prop_gremove:Nn
606 \prop_gset_eq:NN
607 \prop_gset_from_keyval:Nn
608 \seq_gset_eq:NN
609 \skip_gzero:N
610 \skip_gset:Nn
611 \skip_gset_eq:NN
612 \skip_gadd:Nn
613 \skip_gsub:Nn
614 \str_gclear:N
615 \str_gset_eq:NN
616 \str_gput_left:Nn
617 \str_gput_right:Nn
618 \__kernel_tl_gset:Nx
619 \tl_gclear:N
620 \tl_gset_eq:NN
621 \tl_gput_left:Nn
622 \tl_gput_left:NV
623 \tl_gput_left:Nv
624 \tl_gput_left:Ne
625 \tl_gput_left:No
626 \tl_gput_right:Nn
627 \tl_gput_right:NV
628 \tl_gput_right:Nv
629 \tl_gput_right:Ne
630 \tl_gput_right:No
631 \tl_build_gbegin:N
632 \tl_build_gput_right:Nn
633 \tl_build_gput_left:Nn
634 \vbox_gset:Nn
635 \vbox_gset_top:Nn
636 \vbox_gset_to_ht:Nnn
637 \vbox_gset_top_to_ht:Nnn
638 \vbox_gset:Nw
639 \vbox_gset_to_ht:Nnw
640 \vbox_gset_split_to_ht:NNn
641 }
642 \__kernel_patch:nnn
643 { \__kernel_chk_var_scope:NN c #1 }
644 { }
645 {
646 \bool_const:Nn
647 \cctab_const:Nn
648 \dim_const:Nn
649 \int_const:Nn
650 \intarray_const_from_clist:Nn
651 \muskip_const:Nn
652 \prop_const_from_keyval:Nn
653 \prop_const_linked_from_keyval:Nn
654 \skip_const:Nn
655 \str_const:Nn
656 \tl_const:Nn
657 }
658 \__kernel_patch:nnn
659 { \__kernel_chk_flag_exist:NN }
660 { }
661 {
662 \flag_ensure_raised:N
663 \flag_height:N
664 \flag_if_raised:NT
665 \flag_if_raised:NF
666 \flag_if_raised:NTF
667 \flag_if_raised_p:N
668 \flag_raise:N
669 }
670 \__kernel_patch:nnn
671 { \__kernel_chk_cs_exist:N #1 }
672 { }
673 { \cs_generate_variant:Nn }
674 \__kernel_patch:nnn
675 { \__kernel_chk_var_scope:NN g #1 }
676 { }
677 { \cctab_new:N }
678 \__kernel_patch:nnn
679 { \__kernel_chk_var_scope:NN l #1 }
680 { }
681 { \flag_new:N }
682 \__kernel_patch:nnn
683 {
684 \__kernel_chk_var_scope:NN l #1
685 \__kernel_chk_flag_exist:NN
686 }
687 { }
688 { \flag_clear:N }
689 \__kernel_patch:nnn
690 { \__kernel_chk_var_scope:NN g #1 }
691 { }
692 { \intarray_new:Nn }
693 \__kernel_patch:nnn
694 { \__kernel_chk_var_scope:NN q #1 }
695 { }
696 { \quark_new:N }
697 \__kernel_patch:nnn
698 { \__kernel_chk_var_scope:NN s #1 }
699 { }
700 { \scan_new:N }
701 \__kernel_patch:nnn
702 { }
703 {
704 \__kernel_debug_log:e
705 { Defining~\token_to_str:N #1~ \msg_line_context: }
706 }
707 { \__kernel_chk_if_free_cs:N }
708 \__kernel_patch_weird:nnn
709 {
710 \cs_if_free:NF #4
711 {
712 \__kernel_debug_log:e
713 {
714 Variant~\token_to_str:N #4~%
715 already~defined;~ not~ changing~ it~ \msg_line_context:
716 }
717 }
718 }
719 { }
720 { \__cs_generate_variant:wwNN }
721 \__kernel_patch:nnn
722 {
723 \cs_if_exist:cF { \c__keys_code_root_str #1 }
724 { \__kernel_debug_log:e { Defining~key~#1~\msg_line_context: } }
725 }
726 { }
727 { \__keys_cmd_set_direct:nn }
728 \__kernel_patch:nnn
729 { }
730 {
731 \__kernel_debug_log:e
732 { Defining~message~ #1 / #2 ~\msg_line_context: }
733 }
734 { \__msg_chk_free:nn }
735 \__kernel_patch_weird:nnn
736 { \__kernel_chk_cs_exist:c { #5 _p : #6 } }
737 { }
738 { \__prg_set_eq_conditional_p_form:wNnnnn }
739 \__kernel_patch_weird:nnn
740 { \__kernel_chk_cs_exist:c { #5 : #6 TF } }
741 { }
742 { \__prg_set_eq_conditional_TF_form:wNnnnn }
743 \__kernel_patch_weird:nnn
744 { \__kernel_chk_cs_exist:c { #5 : #6 T } }
745 { }
746 { \__prg_set_eq_conditional_T_form:wNnnnn }
747 \__kernel_patch_weird:nnn
748 { \__kernel_chk_cs_exist:c { #5 : #6 F } }
749 { }
750 { \__prg_set_eq_conditional_F_form:wNnnnn }
751 \__kernel_patch:nnn
752 {
753 \__regex_trace_push:nnN { regex } { 1 } \__regex_escape_use:nnnn
754 \group_begin:
755 \__kernel_tl_set:Nx \l__regex_tmpa_tl
756 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_escape_use:nnnn }
757 \use_none:nnn
758 }
759 { }
760 { \__regex_escape_use:nnn }
761 \__kernel_patch:nnn
762 { \__regex_trace_push:nnN { regex } { 1 } \__regex_build:N }
763 {
764 \__regex_trace_states:n { 2 }
765 \__regex_trace_pop:nnN { regex } { 1 } \__regex_build:N
766 }
767 { \__regex_build:N }
768 \__kernel_patch:nnn
769 { \__regex_trace_push:nnN { regex } { 1 } \__regex_build_for_cs:n }
770 {
771 \__regex_trace_states:n { 2 }
772 \__regex_trace_pop:nnN { regex } { 1 } \__regex_build_for_cs:n
773 }
774 { \__regex_build_for_cs:n }
775 \__kernel_patch:nnn
776 {
777 \__regex_trace:nne { regex } { 2 }
778 {
779 regex~new~state~
780 L=\int_use:N \l__regex_left_state_int ~ -> ~
781 R=\int_use:N \l__regex_right_state_int ~ -> ~
782 M=\int_use:N \l__regex_max_state_int ~ -> ~
783 \int_eval:n { \l__regex_max_state_int + 1 }
784 }
785 }
786 { }
787 { \__regex_build_new_state: }
788 \__kernel_patch:nnn
789 { \__regex_trace_push:nnN { regex } { 1 } \__regex_group_aux:nnnnN }
790 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_group_aux:nnnnN }
791 { \__regex_group_aux:nnnnN }
792 \__kernel_patch:nnn
793 { \__regex_trace_push:nnN { regex } { 1 } \__regex_branch:n }
794 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_branch:n }
795 { \__regex_branch:n }
796 \__kernel_patch:nnn
797 {
798 \__regex_trace_push:nnN { regex } { 1 } \__regex_match:n
799 \__regex_trace:nne { regex } { 1 } { analyzing~query~token~list }
800 }
801 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_match:n }
802 { \__regex_match:n }
803 \__kernel_patch:nnn
804 {
805 \__regex_trace_push:nnN { regex } { 1 } \__regex_match_cs:n
806 \__regex_trace:nne { regex } { 1 } { analyzing~query~token~list }
807 }
808 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_match_cs:n }
809 { \__regex_match_cs:n }
810 \__kernel_patch:nnn
811 { \__regex_trace:nne { regex } { 1 } { initializing } }
812 { }
813 { \__regex_match_init: }
814 \__kernel_patch:nnn
815 {
816 \__regex_trace:nne { regex } { 2 }
817 { state~\int_use:N \l__regex_curr_state_int }
818 }
819 { }
820 { \__regex_use_state: }
821 \__kernel_patch:nnn
822 { \__regex_trace_push:nnN { regex } { 1 } \__regex_replacement:n }
823 { \__regex_trace_pop:nnN { regex } { 1 } \__regex_replacement:n }
824 { \__regex_replacement:n }
825 \group_end:
826 \group_begin:
827 \cs_set_protected:Npn \__kernel_patch:Nn #1
828 {
829 \group_begin:
830 \char_set_catcode_other:N \#
831 \__kernel_patch_aux:Nn #1
832 }
833 \cs_set_protected:Npn \__kernel_patch_aux:Nn #1#2
834 {
835 \char_set_catcode_parameter:N \#
836 \tex_endlinechar:D -1 \scan_stop:
837 \exp_args:Ne \tex_scantokens:D
838 {
839 \tex_global:D \cs_prefix_spec:N #1 \tex_def:D \exp_not:N #1
840 \cs_parameter_spec:N #1
841 { \exp_args:No \tl_to_str:n { #1 #2 } }
842 }
843 \group_end:
844 }
845 \cs_set_protected:Npn \__kernel_patch_eval:nn #1#2
846 {
847 \tl_map_inline:nn {#1}
848 {
849 \exp_args:NNe \__kernel_patch:Nn ##1
850 {
851 { \c_hash_str 1 }
852 {
853 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 2 }
854 \exp_not:n {#2}
855 \exp_not:N ##1
856 }
857 }
858 }
859 }
860 \__kernel_patch_eval:nn
861 {
862 \dim_set:Nn
863 \dim_gset:Nn
864 \dim_add:Nn
865 \dim_gadd:Nn
866 \dim_sub:Nn
867 \dim_gsub:Nn
868 \dim_const:Nn
869 }
870 { \__dim_eval:w { } }
871 \__kernel_patch_eval:nn
872 {
873 \int_set:Nn
874 \int_gset:Nn
875 \int_add:Nn
876 \int_gadd:Nn
877 \int_sub:Nn
878 \int_gsub:Nn
879 \int_const:Nn
880 }
881 { \__int_eval:w { } }
882 \__kernel_patch_eval:nn
883 {
884 \muskip_set:Nn
885 \muskip_gset:Nn
886 \muskip_add:Nn
887 \muskip_gadd:Nn
888 \muskip_sub:Nn
889 \muskip_gsub:Nn
890 \muskip_const:Nn
891 }
892 { \tex_muexpr:D { \tex_mutoglue:D } }
893 \__kernel_patch_eval:nn
894 {
895 \skip_set:Nn
896 \skip_gset:Nn
897 \skip_add:Nn
898 \skip_gadd:Nn
899 \skip_sub:Nn
900 \skip_gsub:Nn
901 \skip_const:Nn
902 }
903 { \tex_glueexpr:D { } }
904 \cs_set_protected:Npn \__kernel_patch_eval:nn #1#2
905 {
906 \tl_map_inline:nn {#1}
907 {
908 \exp_args:NNe \__kernel_patch:Nn ##1
909 {
910 {
911 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 1 }
912 \exp_not:n {#2}
913 \exp_not:N ##1
914 }
915 }
916 }
917 }
918 \__kernel_patch_eval:nn
919 { \__box_dim_eval:n }
920 { \__box_dim_eval:w { } }
921 \__kernel_patch_eval:nn
922 {
923 \dim_eval:n
924 \dim_to_decimal:n
925 \dim_to_decimal_in_sp:n
926 \dim_abs:n
927 \dim_sign:n
928 }
929 { \__dim_eval:w { } }
930 \__kernel_patch_eval:nn
931 {
932 \int_eval:n
933 \int_abs:n
934 \int_sign:n
935 }
936 { \__int_eval:w { } }
937 \__kernel_patch_eval:nn
938 {
939 \skip_eval:n
940 \skip_horizontal:n
941 \skip_vertical:n
942 }
943 { \tex_glueexpr:D { } }
944 \__kernel_patch_eval:nn
945 {
946 \muskip_eval:n
947 }
948 { \tex_muexpr:D { \tex_mutoglue:D } }
949 \cs_set_protected:Npn \__kernel_patch_eval:nn #1#2
950 {
951 \tl_map_inline:nn {#1}
952 {
953 \exp_args:NNe \__kernel_patch:Nn ##1
954 {
955 {
956 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 1 }
957 \exp_not:n {#2}
958 \exp_not:N ##1
959 }
960 {
961 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 2 }
962 \exp_not:n {#2}
963 \exp_not:N ##1
964 }
965 }
966 }
967 }
968 \__kernel_patch_eval:nn
969 {
970 \dim_max:nn
971 \dim_min:nn
972 }
973 { \__dim_eval:w { } }
974 \__kernel_patch_eval:nn
975 {
976 \int_max:nn
977 \int_min:nn
978 \int_div_truncate:nn
979 \int_mod:nn
980 }
981 { \__int_eval:w { } }
982 \cs_set_protected:Npn \__kernel_patch_cond:nn #1#2
983 {
984 \clist_map_inline:nn { :nNnT , :nNnF , :nNnTF , _p:nNn }
985 {
986 \exp_args:Nce \__kernel_patch:Nn { #1 ##1 }
987 {
988 {
989 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 1 }
990 \exp_not:n {#2}
991 \exp_not:c { #1 ##1 }
992 }
993 { \c_hash_str 2 }
994 {
995 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 3 }
996 \exp_not:n {#2}
997 \exp_not:c { #1 ##1 }
998 }
999 }
1000 }
1001 }
1002 \__kernel_patch_cond:nn { dim_compare } { \__dim_eval:w { } }
1003 \__kernel_patch_cond:nn { int_compare } { \__int_eval:w { } }
1004 \cs_set_protected:Npn \__kernel_patch_cond:nn #1#2
1005 {
1006 \clist_map_inline:nn { :nT , :nF , :nTF , _p:n }
1007 {
1008 \exp_args:Nce \__kernel_patch:Nn { #1 ##1 }
1009 {
1010 {
1011 \exp_not:N \__kernel_chk_expr:nNnN { \c_hash_str 1 }
1012 \exp_not:n {#2}
1013 \exp_not:c { #1 ##1 }
1014 }
1015 }
1016 }
1017 }
1018 \__kernel_patch_cond:nn { int_if_even } { \__int_eval:w { } }
1019 \__kernel_patch_cond:nn { int_if_odd } { \__int_eval:w { } }
1020 \__kernel_patch:Nn \dim_step_function:nnnN
1021 {
1022 {
1023 \__kernel_chk_expr:nNnN {#1} \__dim_eval:w { }
1024 \dim_step_function:nnnN
1025 }
1026 {
1027 \__kernel_chk_expr:nNnN {#2} \__dim_eval:w { }
1028 \dim_step_function:nnnN
1029 }
1030 {
1031 \__kernel_chk_expr:nNnN {#3} \__dim_eval:w { }
1032 \dim_step_function:nnnN
1033 }
1034 }
1035 \__kernel_patch:Nn \int_step_function:nnnN
1036 {
1037 {
1038 \__kernel_chk_expr:nNnN {#1} \__int_eval:w { }
1039 \int_step_function:nnnN
1040 }
1041 {
1042 \__kernel_chk_expr:nNnN {#2} \__int_eval:w { }
1043 \int_step_function:nnnN
1044 }
1045 {
1046 \__kernel_chk_expr:nNnN {#3} \__int_eval:w { }
1047 \int_step_function:nnnN
1048 }
1049 }
1050 \__kernel_patch:Nn \dim_to_fp:n { { (#1) } }
1051 \group_end:
1052 \cs_set_protected:Npn \__skip_tmp:w #1
1053 {
1054 \prg_set_conditional:Npnn \skip_if_finite:n ##1 { p , T , F , TF }
1055 {
1056 \exp_after:wN \__skip_if_finite:wwNw
1057 \skip_use:N \tex_glueexpr:D
1058 \__kernel_chk_expr:nNnN
1059 {##1} \tex_glueexpr:D { } \skip_if_finite:n
1060 \__skip_sep: \prg_return_false:
1061 #1 \__skip_sep: \prg_return_true: \s__skip_stop
1062 }
1063 }
1064 \exp_args:No \__skip_tmp:w { \tl_to_str:n { fil } }
1065 \msg_new:nnnn { debug } { debug }
1066 { The~debugging~option~'#1'~does~not~exist~\msg_line_context:. }
1067 {
1068 The~functions~'\iow_char:N\\debug_on:n'~and~
1069 '\iow_char:N\\debug_off:n'~only~accept~the~arguments~
1070 'all',~'check-declarations',~'check-expressions',~
1071 'deprecation',~'log-functions',~not~'#1'.
1072 }
1073 \msg_new:nnn { debug } { expr } { '#2'~in~#1 }
1074 \msg_new:nnnn { debug } { local-global }
1075 { Inconsistent~local/global~assignment }
1076 {
1077 \c__msg_coding_error_text_tl
1078 \if:w l #2 Local
1079 \else:
1080 \if:w g #2 Global \else: Constant \fi:
1081 \fi:
1082 \ %
1083 assignment~to~a~
1084 \if:w l #1 local
1085 \else:
1086 \if:w g #1 global \else: constant \fi:
1087 \fi:
1088 \ %
1089 variable~'#3'.
1090 }
1091 \msg_new:nnnn { debug } { non-declared-variable }
1092 { The~variable~#1~has~not~been~declared~\msg_line_context:. }
1093 {
1094 \c__msg_coding_error_text_tl
1095 Checking~is~active,~and~you~have~tried~do~so~something~like: \\
1096 \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\
1097 without~first~having: \\
1098 \ \ \tl_new:N ~ #1 \\
1099 \\
1100 LaTeX~will~continue,~creating~the~variable~where~it~is~the~one~being~set.
1101 }
1102 \cs_set_protected:Npn \__kernel_if_debug:TF #1#2 {#1}
1103 %%
1104 %%
1105 %% End of file `l3debug.def'.