texlive[63408] Build/source/texk/web2c/cwebdir: [CWEB] Unambiguous
commits+ascherer at tug.org
commits+ascherer at tug.org
Fri May 27 00:39:42 CEST 2022
Revision: 63408
http://tug.org/svn/texlive?view=revision&revision=63408
Author: ascherer
Date: 2022-05-27 00:39:42 +0200 (Fri, 27 May 2022)
Log Message:
-----------
[CWEB] Unambiguous production rules 83 and 121.
Rule 121 is a trivial concretization.
Rule 83 is changed to correctly format 'trivial' CWEB code like
@c
#include <stdio.h>
@#
main() {}
that got clobbered as in 'queen.w' from The Stanford GraphBase.
As always, thanks to Github contributor @texdraft!
Modified Paths:
--------------
trunk/Build/source/texk/web2c/cwebdir/ChangeLog
trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
trunk/Build/source/texk/web2c/cwebdir/cweave.w
trunk/Build/source/texk/web2c/cwebdir/prod-cweave.w
trunk/Build/source/texk/web2c/cwebdir/prod-twill.w
trunk/Build/source/texk/web2c/cwebdir/prod.w
Modified: trunk/Build/source/texk/web2c/cwebdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/ChangeLog 2022-05-26 22:39:42 UTC (rev 63408)
@@ -1,3 +1,13 @@
+2022-05-26 Andreas Scherer <https://ascherer.github.io>
+
+ * ctwill-mini.ch,
+ * ctwill-w2c.ch,
+ * cweav-w2c.ch,
+ * cweave.w,
+ * prod-cweave.w,
+ * prod-twill.w,
+ * prod.w: Unambiguous prductions 83 and 121.
+
2022-05-23 Andreas Scherer <https://ascherer.github.io>
* Makefile,
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-mini.ch 2022-05-26 22:39:42 UTC (rev 63408)
@@ -1566,9 +1566,9 @@
if ((a<indent && !(b==big_cancel&&a==' ')) @|
|| (a>big_force && a!=dindent)) break;
switch (a) {
+ case dindent: c++; @=/* fall through */@>@;
case indent: c++; break;
case outdent: c--; break;
- case dindent: c+=2; break;
case opt: a=get_output();
}
}
@@ -1608,9 +1608,9 @@
if ((a<indent && !(b==big_cancel&&a==' ')) @|
|| (a>big_force && a!=dindent)) break;
switch (a) {
+ case dindent: c++; @=/* fall through */@>@;
case indent: c++; break;
case outdent: c--; break;
- case dindent: c+=2; break;
case opt: a=get_output();
}
}
Modified: trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/ctwill-w2c.ch 2022-05-26 22:39:42 UTC (rev 63408)
@@ -618,7 +618,7 @@
@ @c
#if 0
- at t\4\4@>static void
+static void
print_text( /* prints a token list for debugging; not used in |main| */
@z
Modified: trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/cweav-w2c.ch 2022-05-26 22:39:42 UTC (rev 63408)
@@ -290,7 +290,7 @@
@ @c
#if 0
- at t\4\4@>static void
+static void
print_text( /* prints a token list for debugging; not used in |main| */
@z
Modified: trunk/Build/source/texk/web2c/cwebdir/cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/cweave.w 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/cweave.w 2022-05-26 22:39:42 UTC (rev 63408)
@@ -2979,8 +2979,8 @@
else reduce(pp,0,exp,-2,82);
@ @<Cases for |insert|@>=
-if (cat1)
- squash(pp,2,cat1,0,83);
+if (cat1==function)
+ squash(pp,2,function,0,83);
@ @<Cases for |prelangle|@>=
init_mathness=cur_mathness=yes_math;
@@ -3106,7 +3106,7 @@
}
@ @<Cases for |delete_like|@>=
-if (cat1==lpar && cat2==rpar) {
+if (cat1==lbrack && cat2==rbrack) {
big_app2(pp); app_str("\\,"); big_app1(pp+2);
@.\\,@>
reduce(pp,3,delete_like,0,121);
@@ -3931,9 +3931,9 @@
if ((a<indent && !(b==big_cancel&&a==' ')) @|
|| (a>big_force && a!=dindent)) break;
switch (a) {
+ case dindent: c++; @=/* fall through */@>@;
case indent: c++; break;
case outdent: c--; break;
- case dindent: c+=2; break;
case opt: a=get_output();
}
}
Modified: trunk/Build/source/texk/web2c/cwebdir/prod-cweave.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/prod-cweave.w 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/prod-cweave.w 2022-05-26 22:39:42 UTC (rev 63408)
@@ -212,7 +212,7 @@
\+& |section_scrap| |semi| & |stmt|\hfill $MS$ |force|
&$\langle\,$section name$\,\rangle$;\cr
\+& |section_scrap| & |exp| &$\langle\,$section name$\,\rangle$\cr
-\+& |insert| \\{any} & \\{any} & \.{\v\#include\v}\cr
+\+& |insert| |function| & |function| & \#\&{include} before \\{main}\cr
\+& |prelangle| & |binop| \hfill \.< & $<$ not in template\cr
\+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
\+& |langle| |prerangle| & |cast| \hfill $L\.{\\,}P$ & $\langle\,\rangle$\cr
@@ -269,7 +269,7 @@
|typedef_like| \alt |cast| |ubinop| \hfill
\alt $C=\.\{U\.\}C$ $U_2=\.\{U_1\.\}U_2$ \unskip &
\&{typedef} |*|{}|*|(\&{CPtr})\cr
-\+& |delete_like| |lpar| |rpar| & |delete_like|\hfill $DL\.{\\,}R$
+\+& |delete_like| |lbrack| |rbrack| & |delete_like|\hfill $DL\.{\\,}R$
& \&{delete}[\,] \cr
\+& |delete_like| |exp| & |exp| \hfill $D\.\ E$ & \&{delete} $p$ \cr
\+\dagit& |question| |exp| \alt |colon| |base| & |binop|
Modified: trunk/Build/source/texk/web2c/cwebdir/prod-twill.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/prod-twill.w 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/prod-twill.w 2022-05-26 22:39:42 UTC (rev 63408)
@@ -212,7 +212,7 @@
\+& |section_scrap| |semi| & |stmt|\hfill $MS$ |force|
&$\langle\,$section name$\,\rangle$;\cr
\+& |section_scrap| & |exp| &$\langle\,$section name$\,\rangle$\cr
-\+& |insert| \\{any} & \\{any} & \.{\v\#include\v}\cr
+\+& |insert| |function| & |function| & \#\&{include} before \\{main}\cr
\+& |prelangle| & |binop| \hfill \.< & $<$ not in template\cr
\+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
\+& |langle| |prerangle| & |cast| \hfill $L\.{\\,}P$ & $\langle\,\rangle$\cr
@@ -264,7 +264,7 @@
\+\dag202\enspace& |typedef_like| |int_like| |raw_int| & |typedef_like| |int_like| |exp| &
\&{typedef} \&{int} \&{foo}\cr
\global\prodno=121
-\+& |delete_like| |lpar| |rpar| & |delete_like|\hfill $DL\.{\\,}R$
+\+& |delete_like| |lbrack| |rbrack| & |delete_like|\hfill $DL\.{\\,}R$
& \&{delete}[\,] \cr
\+& |delete_like| |exp| & |exp| \hfill $D\.\ E$ & \&{delete} $p$ \cr
\+\dagit& |question| |exp| \alt |colon| |base| & |binop|
Modified: trunk/Build/source/texk/web2c/cwebdir/prod.w
===================================================================
--- trunk/Build/source/texk/web2c/cwebdir/prod.w 2022-05-26 19:51:53 UTC (rev 63407)
+++ trunk/Build/source/texk/web2c/cwebdir/prod.w 2022-05-26 22:39:42 UTC (rev 63408)
@@ -212,7 +212,7 @@
\+& |section_scrap| |semi| & |stmt|\hfill $MS$ |force|
&$\langle\,$section name$\,\rangle$;\cr
\+& |section_scrap| & |exp| &$\langle\,$section name$\,\rangle$\cr
-\+& |insert| \\{any} & \\{any} & \.{\v\#include\v}\cr
+\+& |insert| |function| & |function| & \#\&{include} before \\{main}\cr
\+& |prelangle| & |binop| \hfill \.< & $<$ not in template\cr
\+& |prerangle| & |binop| \hfill \.> & $>$ not in template\cr
\+& |langle| |prerangle| & |cast| \hfill $L\.{\\,}P$ & $\langle\,\rangle$\cr
@@ -269,7 +269,7 @@
|typedef_like| \alt |cast| |ubinop| \hfill
\alt $C=\.\{U\.\}C$ $U_2=\.\{U_1\.\}U_2$ \unskip &
\&{typedef} |*|{}|*|(\&{CPtr})\cr
-\+& |delete_like| |lpar| |rpar| & |delete_like|\hfill $DL\.{\\,}R$
+\+& |delete_like| |lbrack| |rbrack| & |delete_like|\hfill $DL\.{\\,}R$
& \&{delete}[\,] \cr
\+& |delete_like| |exp| & |exp| \hfill $D\.\ E$ & \&{delete} $p$ \cr
\+\dagit& |question| |exp| \alt |colon| |base| & |binop|
More information about the tex-live-commits
mailing list.