diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-07-12 15:16:51 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-07-14 06:48:48 +0200 |
commit | 78f72a451651b3d677f73e5d6960a6b68a50612b (patch) | |
tree | a3859243a373535b583760fae8d4f25721dd3e92 /src/print.c | |
parent | c04693d651b6cefc67337146e5911e3070bf9ef4 (diff) | |
download | bison-78f72a451651b3d677f73e5d6960a6b68a50612b.tar.gz |
style: s/lookahead_tokens/lookaheads/g
Currently we use both names. Let's stick to the short one.
* src/AnnotationList.c, src/conflicts.c, src/counterexample.c,
* src/getargs.c, src/getargs.h, src/graphviz.c, src/ielr.c,
* src/lalr.c, src/print-graph.c, src/print-xml.c, src/print.c,
* src/state-item.c, src/state.c, src/state.h, src/tables.c:
s/lookahead_token/lookahead/gi.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/print.c b/src/print.c index 257eef25..7aba2189 100644 --- a/src/print.c +++ b/src/print.c @@ -90,9 +90,9 @@ print_core (FILE *out, const state *s) previous_rule = r; /* Display the lookahead tokens? */ - if (report_flag & report_lookahead_tokens + if (report_flag & report_lookaheads && item_number_is_rule_number (*sp1)) - state_rule_lookahead_tokens_print (s, r, out); + state_rule_lookaheads_print (s, r, out); fputc ('\n', out); } } @@ -181,18 +181,18 @@ print_errs (FILE *out, const state *s) /*-------------------------------------------------------------------------. -| Report a reduction of RULE on LOOKAHEAD_TOKEN (which can be 'default'). | +| Report a reduction of RULE on LOOKAHEAD (which can be 'default'). | | If not ENABLED, the rule is masked by a shift or a reduce (S/R and | | R/R conflicts). | `-------------------------------------------------------------------------*/ static void print_reduction (FILE *out, size_t width, - const char *lookahead_token, + const char *lookahead, rule *r, bool enabled) { - fprintf (out, " %s", lookahead_token); - for (int j = width - mbswidth (lookahead_token, 0); j > 0; --j) + fprintf (out, " %s", lookahead); + for (int j = width - mbswidth (lookahead, 0); j > 0; --j) fputc (' ', out); if (!enabled) fputc ('[', out); @@ -239,13 +239,13 @@ print_reductions (FILE *out, const state *s) if (default_reduction) width = mbswidth (_("$default"), 0); - if (reds->lookahead_tokens) + if (reds->lookaheads) for (int i = 0; i < ntokens; i++) { bool count = bitset_test (no_reduce_set, i); for (int j = 0; j < reds->num; ++j) - if (bitset_test (reds->lookahead_tokens[j], i)) + if (bitset_test (reds->lookaheads[j], i)) { if (! count) { @@ -268,7 +268,7 @@ print_reductions (FILE *out, const state *s) bool default_reduction_only = true; /* Report lookahead tokens (or $default) and reductions. */ - if (reds->lookahead_tokens) + if (reds->lookaheads) for (int i = 0; i < ntokens; i++) { bool defaulted = false; @@ -277,7 +277,7 @@ print_reductions (FILE *out, const state *s) default_reduction_only = false; for (int j = 0; j < reds->num; ++j) - if (bitset_test (reds->lookahead_tokens[j], i)) + if (bitset_test (reds->lookaheads[j], i)) { if (! count) { |