mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
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.
This commit is contained in:
@@ -86,12 +86,12 @@ print_core (FILE *out, int level, state *s)
|
||||
reductions *reds = s->reductions;
|
||||
int red = state_reduction_find (s, r);
|
||||
/* Print item with lookaheads if there are. */
|
||||
if (reds->lookahead_tokens && red != -1)
|
||||
if (reds->lookaheads && red != -1)
|
||||
{
|
||||
xml_printf (out, level + 1,
|
||||
"<item rule-number=\"%d\" dot=\"%d\">",
|
||||
r->number, sp1 - sp);
|
||||
state_rule_lookahead_tokens_print_xml (s, r,
|
||||
state_rule_lookaheads_print_xml (s, r,
|
||||
out, level + 2);
|
||||
xml_puts (out, level + 1, "</item>");
|
||||
printed = true;
|
||||
@@ -203,25 +203,25 @@ print_errs (FILE *out, int level, 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, int level, char const *lookahead_token,
|
||||
print_reduction (FILE *out, int level, char const *lookahead,
|
||||
rule *r, bool enabled)
|
||||
{
|
||||
if (r->number)
|
||||
xml_printf (out, level,
|
||||
"<reduction symbol=\"%s\" rule=\"%d\" enabled=\"%s\"/>",
|
||||
xml_escape (lookahead_token),
|
||||
xml_escape (lookahead),
|
||||
r->number,
|
||||
enabled ? "true" : "false");
|
||||
else
|
||||
xml_printf (out, level,
|
||||
"<reduction symbol=\"%s\" rule=\"accept\" enabled=\"%s\"/>",
|
||||
xml_escape (lookahead_token),
|
||||
xml_escape (lookahead),
|
||||
enabled ? "true" : "false");
|
||||
}
|
||||
|
||||
@@ -258,13 +258,13 @@ print_reductions (FILE *out, int level, state *s)
|
||||
if (default_reduction)
|
||||
report = true;
|
||||
|
||||
if (reds->lookahead_tokens)
|
||||
if (reds->lookaheads)
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
bool count = bitset_test (no_reduce_set, i);
|
||||
|
||||
for (j = 0; j < reds->num; ++j)
|
||||
if (bitset_test (reds->lookahead_tokens[j], i))
|
||||
if (bitset_test (reds->lookaheads[j], i))
|
||||
{
|
||||
if (! count)
|
||||
{
|
||||
@@ -289,14 +289,14 @@ print_reductions (FILE *out, int level, state *s)
|
||||
xml_puts (out, level, "<reductions>");
|
||||
|
||||
/* Report lookahead tokens (or $default) and reductions. */
|
||||
if (reds->lookahead_tokens)
|
||||
if (reds->lookaheads)
|
||||
for (i = 0; i < ntokens; i++)
|
||||
{
|
||||
bool defaulted = false;
|
||||
bool count = bitset_test (no_reduce_set, i);
|
||||
|
||||
for (j = 0; j < reds->num; ++j)
|
||||
if (bitset_test (reds->lookahead_tokens[j], i))
|
||||
if (bitset_test (reds->lookaheads[j], i))
|
||||
{
|
||||
if (! count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user