[TUHS] Yacc binary on 4th edition tape
Jonathan Gray via TUHS
tuhs at tuhs.org
Mon Apr 27 17:58:08 AEST 2026
On Tue, Jan 13, 2026 at 12:21:25PM +1100, Jonathan Gray via TUHS wrote:
> On Sun, Jan 11, 2026 at 11:21:39PM +0100, Paul Ruizendaal via TUHS wrote:
> > Jonathan Gray very kindly found two sources for “yopti” in the TUHS archives.
> >
> > The first is in the UNSW 110 archive (https://www.tuhs.org/Archive/Distributions/UNSW/110/). The archive is from 1981, but it appears to be the 1975 yacc of 6th edition.
> >
> > This yacc has the source for the optimizer ("yopti.c”). It reads the the y.tab.c file that plain 6th edition yacc generates, does some processing and writes out a new y.tab.c. It also comes with a new yyparse routine and this routine is essentially identical to the yyparse of 7th edition (which I think is more or less the final version of classic yacc).
> >
> > The other is in the PWB1 distribution (https://www.tuhs.org/cgi-bin/utree.pl?file=PWB1/sys/source/s2/yacc.d), from 1977. The optimizer is now in the source file "y5.c” and largely, but not fully the same. It has a new way to compress the “yyact” table. The y5.c file can build both as a separate program and as a subroutine of the yacc core, reusing table space from the earlier phases. The new way to compress is also used in 7th edition, but the optimizer has been fully integrated in the core yacc codebase.
>
> Also appears (without source) in a listing of files.
>
> Documentation/TechReports/USG_Library/
> 1046_UNIX_Support_Classifications_for_PG_1C300_Issue_2.pdf
>
> UNIX Support Classifications for PG-1C300-1 Issue 2
> January 30, 1976
>
> opar.c yacc optimization parser
> yopti.c yacc optimizer postpass
opar.c and yopti.c also appear in the PG3 sources. The yacc code
in PG3 appears to be older than the version in UNSW 110. The rest is
very close to Sixth Edition.
https://www.tuhs.org/cgi-bin/utree.pl?file=USG_PG3/usr/source/yacc/yopti.c
A /usr/yacc/yopti binary is also part of the filesystem.
More information about the TUHS
mailing list