Skip to content

Commit

Permalink
l3tl-analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
h20y6m committed Feb 15, 2023
1 parent 83819c4 commit e5e30c4
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 49 deletions.
39 changes: 38 additions & 1 deletion plpatch3.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,45 @@
}
% \end{macrocode}
%
%
% \subsection{Fix for l3tl-analysis}
%
% \begin{macrocode}
%<@@=tl>
% \end{macrocode}
%
% \subsubsection{Fix for the analysis funcrtions}
%
% FIXME: In the case of jachar tokens, I would like to return the kcatcode
% (decimal 16--19, hexadecimal 10--13) instead of the catcode, but expl3
% expects the catcode to be one hexadecimal digit, so we return 0 instead.
% \begin{macrocode}
%<@@=>
\cs_gset:Npx \@@_analysis_b_char:Nn #1#2
{
\exp_not:N \token_if_jachar:NTF #2
{ 0 }
{
\exp_not:N \if_meaning:w #2 \exp_not:N \tex_undefined:D
\token_to_str:N D \exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_catcode_other_token
\token_to_str:N C \exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_catcode_letter_token
\token_to_str:N B \exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_math_toggle_token 3
\exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_alignment_token 4
\exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_math_superscript_token 7
\exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_math_subscript_token 8
\exp_not:N \else:
\exp_not:N \if_catcode:w #2 \c_space_token
\token_to_str:N A \exp_not:N \else:
6
\exp_not:n { \fi: \fi: \fi: \fi: \fi: \fi: \fi: \fi: }
}
#1 {#2}
}
% \end{macrocode}
%
% \begin{macrocode}
Expand Down
22 changes: 11 additions & 11 deletions testfiles/pl3tl-analysis001.ptex-sjis.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ TEST 1: tl_analysis_map_inline
[^^c3][195][D]
[^^bc][188][D]
[ ][32][A]
[α][33727][6]
[β][33728][6]
[γ][33729][6]
[α][33727][0]
[β][33728][0]
[γ][33729][0]
[ ][32][A]
[あ][33440][6]
[い][33442][6]
[う][33444][6]
[え][33446][6]
[お][33448][6]
[あ][33440][0]
[い][33442][0]
[う][33444][0]
[え][33446][0]
[お][33448][0]
[ ][32][A]
[日][37882][6]
[本][38523][6]
[語][36074][6]
[日][37882][0]
[本][38523][0]
[語][36074][0]
[ ][32][A]
[^^e2][226][D]
[^^98][152][D]
Expand Down
22 changes: 11 additions & 11 deletions testfiles/pl3tl-analysis001.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ TEST 1: tl_analysis_map_inline
[^^c3][195][D]
[^^bc][188][D]
[ ][32][A]
[α][42689][6]
[β][42690][6]
[γ][42691][6]
[α][42689][0]
[β][42690][0]
[γ][42691][0]
[ ][32][A]
[あ][42146][6]
[い][42148][6]
[う][42150][6]
[え][42152][6]
[お][42154][6]
[あ][42146][0]
[い][42148][0]
[う][42150][0]
[え][42152][0]
[お][42154][0]
[ ][32][A]
[日][50940][6]
[本][52188][6]
[語][47340][6]
[日][50940][0]
[本][52188][0]
[語][47340][0]
[ ][32][A]
[^^e2][226][D]
[^^98][152][D]
Expand Down
22 changes: 11 additions & 11 deletions testfiles/pl3tl-analysis001.uptex-sjis.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ TEST 1: tl_analysis_map_inline
[^^c3][195][D]
[^^bc][188][D]
[ ][32][A]
[α][33727][6]
[β][33728][6]
[γ][33729][6]
[α][33727][0]
[β][33728][0]
[γ][33729][0]
[ ][32][A]
[あ][33440][6]
[い][33442][6]
[う][33444][6]
[え][33446][6]
[お][33448][6]
[あ][33440][0]
[い][33442][0]
[う][33444][0]
[え][33446][0]
[お][33448][0]
[ ][32][A]
[日][37882][6]
[本][38523][6]
[語][36074][6]
[日][37882][0]
[本][38523][0]
[語][36074][0]
[ ][32][A]
[^^e2][226][D]
[^^98][152][D]
Expand Down
30 changes: 15 additions & 15 deletions testfiles/pl3tl-analysis001.uptex.tlg
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ TEST 1: tl_analysis_map_inline
[^^c3][195][D]
[^^bc][188][D]
[ ][32][A]
[α][945][6]
[β][946][6]
[γ][947][6]
[α][945][0]
[β][946][0]
[γ][947][0]
[ ][32][A]
[あ][12354][6]
[い][12356][6]
[う][12358][6]
[え][12360][6]
[お][12362][6]
[あ][12354][0]
[い][12356][0]
[う][12358][0]
[え][12360][0]
[お][12362][0]
[ ][32][A]
[日][26085][6]
[本][26412][6]
[語][35486][6]
[日][26085][0]
[本][26412][0]
[語][35486][0]
[ ][32][A]
[☀][9728][6]
[☁][9729][6]
[☂][9730][6]
[☃][9731][6]
[☀][9728][0]
[☁][9729][0]
[☂][9730][0]
[☃][9731][0]
============================================================

0 comments on commit e5e30c4

Please sign in to comment.