summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx62
1 files changed, 29 insertions, 33 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
index 2cd25ed4616..42921f9a9da 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-parse.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-parse.dtx 5893 2015-08-26 16:16:52Z mittelba $
+\GetIdInfo$Id: l3fp-parse.dtx 6037 2015-09-23 12:41:15Z joseph $
{L3 Floating-point expression parsing}
\begin{document}
\DocInput{\jobname.dtx}
@@ -626,20 +626,17 @@
% the first |s__fp|. If the \meta{token} does not contain that
% string, the result is |_?|.
% \begin{macrocode}
-\group_begin:
-\char_set_catcode_other:N \S
-\char_set_catcode_other:N \F
-\char_set_catcode_other:N \P
-\char_set_lccode:nn { `\- } { `\_ }
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \@@_type_from_scan:N #1
- {
- \exp_after:wN \@@_type_from_scan:w
- \token_to_str:N #1 \q_mark S--FP-? \q_mark \q_stop
- }
- \cs_new:Npn \@@_type_from_scan:w #1 S--FP #2 \q_mark #3 \q_stop {#2}
+\cs_new:Npx \@@_type_from_scan:N #1
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_type_from_scan:w
+ \exp_not:N \token_to_str:N #1 \exp_not:N \q_mark
+ \tl_to_str:n { s__fp _? } \exp_not:N \q_mark \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_type_from_scan:w
+ ##1 \tl_to_str:n { s__fp } ##2 \exp_not:N \q_mark ##3 \exp_not:N \q_stop
+ {##2}
}
% \end{macrocode}
% \end{macro}
@@ -843,28 +840,27 @@
\exp_after:wN \@@_parse_exponent:N
\exp:w \@@_parse_expand:w
}
-\group_begin:
-\char_set_catcode_other:N \P
-\char_set_catcode_other:N \T
-\char_set_catcode_other:N \M
-\char_set_catcode_other:N \U
-\tl_to_lowercase:n
- {
- \group_end:
- \cs_new:Npn \@@_parse_one_register_aux:Nw #1
+\cs_new:Npx \@@_parse_one_register_aux:Nw #1
+ {
+ \exp_not:n
{
\exp_after:wN \use:nn
\exp_after:wN \@@_parse_one_register_auxii:wwwNw
- \exp_after:wN { \tex_the:D #1 }
- ; \@@_parse_one_register_dim:ww
- PT ; \@@_parse_one_register_mu:www
- . PT ; \@@_parse_one_register_int:www
- \q_stop
}
- \cs_new:Npn \@@_parse_one_register_auxii:wwwNw
- #1 . #2 PT #3 ; #4#5 \q_stop { #4 #1.#2; }
- \cs_new:Npn \@@_parse_one_register_mu:www #1 MU; #2;
- { \@@_parse_one_register_dim:ww #1; }
+ \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 }
+ ; \exp_not:N \@@_parse_one_register_dim:ww
+ \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_mu:www
+ . \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_int:www
+ \exp_not:N \q_stop
+ }
+\use:x
+ {
+ \cs_new:Npn \exp_not:N \@@_parse_one_register_auxii:wwwNw
+ ##1 . ##2 \tl_to_str:n { pt } ##3 ; ##4##5 \exp_not:N \q_stop
+ { ##4 ##1.##2; }
+ \cs_new:Npn \exp_not:N \@@_parse_one_register_mu:www
+ ##1 \tl_to_str:n { mu } ; ##2 ;
+ { \exp_not:N \@@_parse_one_register_dim:ww ##1 ; }
}
\cs_new:Npn \@@_parse_one_register_int:www #1; #2.; #3;
{ \@@_parse:n { #1 e #3 } }