X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/31cef89cb428866f787983e68246030321893df4..4b9ccde74dc34e450ed96bcd3d044f78cf393d8d:/usr/src/cmd/pc0/yyparse.c diff --git a/usr/src/cmd/pc0/yyparse.c b/usr/src/cmd/pc0/yyparse.c index d8c8afdb90..1c0e0bdfff 100644 --- a/usr/src/cmd/pc0/yyparse.c +++ b/usr/src/cmd/pc0/yyparse.c @@ -1,6 +1,6 @@ /* Copyright (c) 1979 Regents of the University of California */ -static char sccsid[] = "@(#)yyparse.c 1.1 8/27/80"; +static char sccsid[] = "@(#)yyparse.c 1.2 3/8/81"; #include "whoami.h" #include "0.h" @@ -13,7 +13,7 @@ static char sccsid[] = "@(#)yyparse.c 1.1 8/27/80"; int yystate; /* Current parser state */ int *yypv; -unsigned yytshifts 1; /* Number of "true" shifts */ +unsigned yytshifts = 1; /* Number of "true" shifts */ /* * Parse Tables @@ -83,13 +83,13 @@ actn: if (yychar < 0) yychar = yylex(); do - if ((n =+ yychar) != 0) + if ((n += yychar) != 0) p++; while ((n = *p++) <= 0); } #else while ((n = *p++) <= 0) - if ((n =+ yychar) != 0) + if ((n += yychar) != 0) p++; #endif switch (n >> 12) { @@ -118,17 +118,17 @@ actn: * Reduce. */ case 3: - n =& 07777; + n &= 07777; N = yyr2[n]; if (N == 1 && OY.Yychar == YID && !yyEactr(n, yypv[0])) { idfail = 1; goto errin; } OY.Yychar = -1; - ps =- N; - yypv =- N; + ps -= N; + yypv -= N; #ifdef PXP - yypw =- N; + yypw -= N; #endif yyval = yypv[1]; yyactr(n); @@ -137,7 +137,7 @@ actn: */ p = &yygo[yypgo[yyr1[n]]]; while (*p != *ps && *p >= 0) - p =+ 2; + p += 2; yystate = p[1]; goto stack; @@ -164,14 +164,14 @@ errin: * legal shift action. */ if (paniced && yyshifts <= 0 && ps >= panicps) { - yypv =- (ps - panicps) + 1; + yypv -= (ps - panicps) + 1; #ifdef PXP - yypw =- (ps - panicps) + 1; + yypw -= (ps - panicps) + 1; #endif ps = panicps - 1; } while (ps >= yys) { - for (p = &yyact[ yypact[*ps+1] ] ; *p <= 0; p=+ 2) + for (p = &yyact[ yypact[*ps+1] ] ; *p <= 0; p += 2) if (*p == -256) { panicps = ps; yystate= p[1] & 07777; @@ -187,7 +187,7 @@ errin: #endif #ifdef PI if (OY.Yychar != YID) - syneflg++; + syneflg = TRUE; #endif OY.Yychar = -1; }