]> git.saurik.com Git - bison.git/blobdiff - src/lalr.c
Be a bit more systematic about using 'abort'.
[bison.git] / src / lalr.c
index 5c162b50d35f606cffb968d680f66bcfb291c399..65c55ab7c8807ac826cd0fdcb2493ad070eb1196 100644 (file)
@@ -94,8 +94,7 @@ set_goto_map (void)
          ngotos++;
 
          /* Abort if (ngotos + 1) would overflow.  */
-         if (ngotos == GOTO_NUMBER_MAXIMUM)
-           abort ();
+         assert (ngotos != GOTO_NUMBER_MAXIMUM);
 
          goto_map[TRANSITION_SYMBOL (sp, i) - ntokens]++;
        }
@@ -154,8 +153,7 @@ map_goto (state_number s0, symbol_number sym)
 
   for (;;)
     {
-      if (high < low)
-       abort ();
+      assert (low <= high);
       middle = (low + high) / 2;
       s = from_state[middle];
       if (s == s0)