X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/17ee7397a87c4c4ccd45f956e0b88b824a3689f9..c2729758f299eced966df137913fa5cab195ad47:/src/print.c diff --git a/src/print.c b/src/print.c index ce9529b7..4f855244 100644 --- a/src/print.c +++ b/src/print.c @@ -1,5 +1,6 @@ /* Print information on generated parser, for bison, - Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002 + + Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -92,7 +93,7 @@ print_core (FILE *out, state *s) { item_number *sp; item_number *sp1; - int r; + rule_number r; sp1 = sp = ritem + sitems[i]; @@ -326,16 +327,16 @@ print_reductions (FILE *out, state *s) if (reds->lookaheads) for (i = 0; i < ntokens; i++) { - int count = bitset_test (shiftset, i); + bool count = bitset_test (shiftset, i); for (j = 0; j < reds->num; ++j) if (bitset_test (reds->lookaheads[j], i)) { - if (count == 0) + if (! count) { if (reds->rules[j] != default_rule) max_length (&width, symbols[i]->tag); - count++; + count = true; } else { @@ -355,21 +356,21 @@ print_reductions (FILE *out, state *s) if (reds->lookaheads) for (i = 0; i < ntokens; i++) { - int defaulted = 0; - int count = bitset_test (shiftset, i); + bool defaulted = false; + bool count = bitset_test (shiftset, i); for (j = 0; j < reds->num; ++j) if (bitset_test (reds->lookaheads[j], i)) { - if (count == 0) + if (! count) { if (reds->rules[j] != default_rule) print_reduction (out, width, symbols[i]->tag, reds->rules[j], true); else - defaulted = 1; - count++; + defaulted = true; + count = true; } else { @@ -377,7 +378,7 @@ print_reductions (FILE *out, state *s) print_reduction (out, width, symbols[i]->tag, default_rule, true); - defaulted = 0; + defaulted = false; print_reduction (out, width, symbols[i]->tag, reds->rules[j], false);