BSD 4_1_snap release
[unix-history] / usr / src / cmd / pc0 / yyparse.c
index d8c8afd..1c0e0bd 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* 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"
 
 #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;
 
 int    yystate;        /* Current parser state */
 int    *yypv;
-unsigned yytshifts 1;  /* Number of "true" shifts */
+unsigned yytshifts = 1;        /* Number of "true" shifts */
 
 /*
  * Parse Tables
 
 /*
  * Parse Tables
@@ -83,13 +83,13 @@ actn:
                if (yychar < 0)
                        yychar = yylex();
                do
                if (yychar < 0)
                        yychar = yylex();
                do
-                       if ((n =+ yychar) != 0)
+                       if ((n += yychar) != 0)
                                p++;
                while ((n = *p++) <= 0);
        }
 #else
        while ((n = *p++) <= 0)
                                p++;
                while ((n = *p++) <= 0);
        }
 #else
        while ((n = *p++) <= 0)
-               if ((n =+ yychar) != 0)
+               if ((n += yychar) != 0)
                        p++;
 #endif
        switch (n >> 12) {
                        p++;
 #endif
        switch (n >> 12) {
@@ -118,17 +118,17 @@ actn:
                 * Reduce.
                 */
                case 3:
                 * 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;
                        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
 #ifdef PXP
-                       yypw =- N;
+                       yypw -= N;
 #endif
                        yyval = yypv[1];
                        yyactr(n);
 #endif
                        yyval = yypv[1];
                        yyactr(n);
@@ -137,7 +137,7 @@ actn:
                         */
                        p = &yygo[yypgo[yyr1[n]]];
                        while (*p != *ps && *p >= 0)
                         */
                        p = &yygo[yypgo[yyr1[n]]];
                        while (*p != *ps && *p >= 0)
-                               p =+ 2;
+                               p += 2;
                        yystate = p[1];
                        goto stack;
 
                        yystate = p[1];
                        goto stack;
 
@@ -164,14 +164,14 @@ errin:
                         * legal shift action.
                         */
                        if (paniced && yyshifts <= 0 && ps >= panicps) {
                         * legal shift action.
                         */
                        if (paniced && yyshifts <= 0 && ps >= panicps) {
-                               yypv =- (ps - panicps) + 1;
+                               yypv -= (ps - panicps) + 1;
 #ifdef PXP
 #ifdef PXP
-                               yypw =- (ps - panicps) + 1;
+                               yypw -= (ps - panicps) + 1;
 #endif
                                ps = panicps - 1;
                        }
                        while (ps >= yys) {
 #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;
                                        if (*p == -256) {
                                                panicps = ps;
                                                yystate= p[1] & 07777;
@@ -187,7 +187,7 @@ errin:
 #endif
 #ifdef PI
                                if (OY.Yychar != YID)
 #endif
 #ifdef PI
                                if (OY.Yychar != YID)
-                                       syneflg++;
+                                       syneflg = TRUE;
 #endif
                                OY.Yychar = -1;
                        }
 #endif
                                OY.Yychar = -1;
                        }