diff options
Diffstat (limited to 'src/gen.c')
-rw-r--r-- | src/gen.c | 42 |
1 files changed, 21 insertions, 21 deletions
@@ -464,14 +464,14 @@ static struct yytbl_data *mkecstbl (void) void genecs (void) { - int i, j; + int ch, row; int numrows; out_str_dec (get_yy_char_decl (), "yy_ec", csize); - for (i = 1; i < csize; ++i) { - ecgroup[i] = ABS (ecgroup[i]); - mkdata (ecgroup[i]); + for (ch = 1; ch < csize; ++ch) { + ecgroup[ch] = ABS (ecgroup[ch]); + mkdata (ecgroup[ch]); } dataend (); @@ -479,12 +479,13 @@ void genecs (void) if (trace) { fputs (_("\n\nEquivalence Classes:\n\n"), stderr); + /* Print in 8 columns */ numrows = csize / 8; - for (j = 0; j < numrows; ++j) { - for (i = j; i < csize; i = i + numrows) { + for (row = 0; row < numrows; ++row) { + for (ch = row; ch < csize; ch += numrows) { fprintf (stderr, "%4s = %-2d", - readable_form (i), ecgroup[i]); + readable_form (ch), ecgroup[ch]); putc (' ', stderr); } @@ -1234,9 +1235,9 @@ void gentabs (void) yytbl_data_compress (yyacc_tbl); if (yytbl_data_fwrite (&tableswr, yyacc_tbl) < 0) flexerror (_("Could not write yyacc_tbl")); - yytbl_data_destroy (yyacc_tbl); - yyacc_tbl = NULL; } + yytbl_data_destroy (yyacc_tbl); + yyacc_tbl = NULL; /* End generating yy_accept */ if (useecs) { @@ -1289,11 +1290,10 @@ void gentabs (void) if (tablesext) { yytbl_data_compress (yymeta_tbl); if (yytbl_data_fwrite (&tableswr, yymeta_tbl) < 0) - flexerror (_ - ("Could not write yymeta_tbl")); - yytbl_data_destroy (yymeta_tbl); - yymeta_tbl = NULL; + flexerror (_("Could not write yymeta_tbl")); } + yytbl_data_destroy (yymeta_tbl); + yymeta_tbl = NULL; /* End generating yy_meta */ } @@ -1350,9 +1350,9 @@ void gentabs (void) yytbl_data_compress (yybase_tbl); if (yytbl_data_fwrite (&tableswr, yybase_tbl) < 0) flexerror (_("Could not write yybase_tbl")); - yytbl_data_destroy (yybase_tbl); - yybase_tbl = NULL; } + yytbl_data_destroy (yybase_tbl); + yybase_tbl = NULL; /* End generating yy_base */ @@ -1382,9 +1382,9 @@ void gentabs (void) yytbl_data_compress (yydef_tbl); if (yytbl_data_fwrite (&tableswr, yydef_tbl) < 0) flexerror (_("Could not write yydef_tbl")); - yytbl_data_destroy (yydef_tbl); - yydef_tbl = NULL; } + yytbl_data_destroy (yydef_tbl); + yydef_tbl = NULL; /* End generating yy_def */ @@ -1420,9 +1420,9 @@ void gentabs (void) yytbl_data_compress (yynxt_tbl); if (yytbl_data_fwrite (&tableswr, yynxt_tbl) < 0) flexerror (_("Could not write yynxt_tbl")); - yytbl_data_destroy (yynxt_tbl); - yynxt_tbl = NULL; } + yytbl_data_destroy (yynxt_tbl); + yynxt_tbl = NULL; /* End generating yy_nxt */ /* Begin generating yy_chk */ @@ -1454,9 +1454,9 @@ void gentabs (void) yytbl_data_compress (yychk_tbl); if (yytbl_data_fwrite (&tableswr, yychk_tbl) < 0) flexerror (_("Could not write yychk_tbl")); - yytbl_data_destroy (yychk_tbl); - yychk_tbl = NULL; } + yytbl_data_destroy (yychk_tbl); + yychk_tbl = NULL; /* End generating yy_chk */ free(acc_array); |