From 3e3ef209c676a34275271415b131a95ad024a0c2 Mon Sep 17 00:00:00 2001 From: Hironobu Yamashita Date: Fri, 12 Jul 2019 16:07:27 +0000 Subject: ptex: strict '! Improper alphabetic or KANJI constant.' error git-svn-id: svn://tug.org/texlive/trunk@51623 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ptexdir/ChangeLog | 6 ++++++ Build/source/texk/web2c/ptexdir/ptex-base.ch | 12 ++++++++++-- Build/source/texk/web2c/ptexdir/tests/let_char_token.tex | 11 +++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 Build/source/texk/web2c/ptexdir/tests/let_char_token.tex (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index 779b6f2f2ee..e7a2289424a 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,9 @@ +2019-06-24 Hironobu Yamashita + + * ptex-base.ch: 'Improper alphabetic or KANJI constant' error + should be raised for multibyte CS. + * tests/let_char_token.tex: Added. + 2019-05-28 Hironobu Yamashita * am/ptex.am: Add a new test. diff --git a/Build/source/texk/web2c/ptexdir/ptex-base.ch b/Build/source/texk/web2c/ptexdir/ptex-base.ch index 891861b331e..5b4ff551aff 100644 --- a/Build/source/texk/web2c/ptexdir/ptex-base.ch +++ b/Build/source/texk/web2c/ptexdir/ptex-base.ch @@ -2275,8 +2275,16 @@ if cur_tok255)and((cur_cmdmax_char_code)) then +else + { the token is a CS; + * if |kanji|<=|cur_cmd|<=|max_char_code|, then CS is let-equal to |wchar_token| + * if |max_char_code|<|cur_cmd|, then CS is a multibyte CS + => both case should raise "Improper ..." error + * otherwise it should be a single-character CS with |cur_val|<=255 } + begin if not (cur_cmd255)and(cur_cmd help2("A one-character control sequence belongs after a ` mark.")@/ diff --git a/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex b/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex new file mode 100644 index 00000000000..2d39d0e3809 --- /dev/null +++ b/Build/source/texk/web2c/ptexdir/tests/let_char_token.tex @@ -0,0 +1,11 @@ +%#!ptex +\newcount\x +\scrollmode +\def\T#1{\x=`#1 \message{\the\x}} +\def\漢{} +\def\aaa{西}\T{\aaa}% err +\def\AAA{s}\T{\AAA} % err +\let\ccc=西\relax\T{\ccc} % err +\T~ \T\a \T{漢} +\T\漢 % err +\end -- cgit v1.2.3