bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

23-fyi-normalize-inc.patch


From: Akim Demaille
Subject: 23-fyi-normalize-inc.patch
Date: Sun, 07 Apr 2002 17:24:41 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * src/reader.c: Normalize increments to prefix form.

Index: src/reader.c
--- src/reader.c Sat, 06 Apr 2002 22:14:47 +0200 akim
+++ src/reader.c Sat, 06 Apr 2002 22:17:42 +0200 akim
@@ -340,7 +325,7 @@
          complain (_("invalid $ value"));
          return NULL;
        }
-      i++;
+      ++i;
     }

   return rp->sym->type_name;
@@ -383,7 +368,7 @@
          obstack_1grow (oout, c);

          if (c == '\n')
-           lineno++;
+           ++lineno;
        }

       c = getc (fin);
@@ -466,7 +451,7 @@
        }
       else if (c == '\n')
        {
-         lineno++;
+         ++lineno;
          obstack_1grow (oout, c);
          if (cplus_comment)
            ended = 1;
@@ -628,7 +613,7 @@
        {
        case '\n':
          obstack_1grow (&attrs_obstack, c);
-         lineno++;
+         ++lineno;
          break;

        case '%':
@@ -845,7 +825,8 @@
   char *name = NULL;
   int prev = 0;

-  lastprec++;                  /* Assign a new precedence level, never 0.  */
+  /* Assign a new precedence level, never 0.  */
+  ++lastprec;

   for (;;)
     {
@@ -950,7 +931,7 @@
       switch (c)
        {
        case '\n':
-         lineno++;
+         ++lineno;
          break;

        case '/':
@@ -958,7 +939,7 @@
          break;

        case '{':
-         count++;
+         ++count;
          break;

        case '}':
@@ -1295,12 +1276,12 @@
          {
          case '\n':
            obstack_1grow (&action_obstack, c);
-           lineno++;
+           ++lineno;
            break;

          case '{':
            obstack_1grow (&action_obstack, c);
-           count++;
+           ++count;
            break;

          case '\'':
@@ -1450,8 +1431,8 @@
          }
        /* start a new rule and record its lhs.  */

-       nrules++;
-       nitems++;
+       ++nrules;
+       ++nitems;

        p = symbol_list_new (lhs);

@@ -1470,7 +1451,7 @@
          {
            lhs->class = nterm_sym;
            lhs->number = nvars;
-           nvars++;
+           ++nvars;
          }
        else if (lhs->class == token_sym)
          complain (_("rule given for %s, which is a token"), lhs->tag);
@@ -1528,8 +1509,8 @@
                /* Make a new rule, whose body is empty, before the
                   current one, so that the action just read can
                   belong to it.  */
-               nrules++;
-               nitems++;
+               ++nrules;
+               ++nitems;
                p = symbol_list_new (sdummy);
                /* Attach its lineno to that of the host rule. */
                p->line = crule->line;
@@ -1550,7 +1531,7 @@

                /* Insert the dummy generated by that rule into this
                   rule.  */
-               nitems++;
+               ++nitems;
                p = symbol_list_new (sdummy);
                p1->next = p;
                p1 = p;
@@ -1560,7 +1541,7 @@

            if (t == tok_identifier)
              {
-               nitems++;
+               ++nitems;
                p = symbol_list_new (symval);
                p1->next = p;
                p1 = p;
@@ -1569,9 +1550,9 @@
              {
                parse_action (crule, rulelength);
                action_flag = 1;
-               xactions++;     /* JF */
+               ++xactions;     /* JF */
              }
-           rulelength++;
+           ++rulelength;
          }                     /* end of  read rhs of rule */

        /* Put an empty link in the list to mark the end of this rule  */
@@ -1603,7 +1584,7 @@
              complain (_("two actions at end of one rule"));
            parse_action (crule, rulelength);
            action_flag = 1;
-           xactions++; /* -wjh */
+           ++xactions; /* -wjh */
            t = lex ();
          }
        /* If $$ is being set in default way, report if any type
@@ -1813,7 +1785,7 @@
          rules[ruleno].prec = ruleprec;
        }
       ritem[itemno++] = -ruleno;
-      ruleno++;
+      ++ruleno;

       if (p)
        p = p->next;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]