mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
style: comment and name changes
* src/output.c (prepare_symbol_names): here. * src/reader.c: Remove obsolete comment. * src/scan-code.l: Use || for Boolean or.
This commit is contained in:
11
src/output.c
11
src/output.c
@@ -137,9 +137,8 @@ string_output (FILE *out, char const *string)
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------.
|
||||
| Prepare the symbols names. |
|
||||
`----------------------------*/
|
||||
/* Generate the b4_<MUSCLE_NAME> (e.g., b4_tname) table with the
|
||||
symbol names (aka tags). */
|
||||
|
||||
static void
|
||||
prepare_symbol_names (char const *muscle_name)
|
||||
@@ -430,13 +429,13 @@ prepare_symbol_definitions (void)
|
||||
key = obstack_finish0 (&format_obstack);
|
||||
|
||||
/* Whether the symbol has an identifier. */
|
||||
const char *value = symbol_id_get (sym);
|
||||
const char *id = symbol_id_get (sym);
|
||||
SET_KEY ("has_id");
|
||||
MUSCLE_INSERT_INT (key, !!value);
|
||||
MUSCLE_INSERT_INT (key, !!id);
|
||||
|
||||
/* Its identifier. */
|
||||
SET_KEY ("id");
|
||||
MUSCLE_INSERT_STRING (key, value ? value : "");
|
||||
MUSCLE_INSERT_STRING (key, id ? id : "");
|
||||
|
||||
/* Its tag. Typically for documentation purpose. */
|
||||
SET_KEY ("tag");
|
||||
|
||||
@@ -829,8 +829,7 @@ check_and_convert_grammar (void)
|
||||
aver (nsyms <= SYMBOL_NUMBER_MAXIMUM);
|
||||
aver (nsyms == ntokens + nvars);
|
||||
|
||||
/* Assign the symbols their symbol numbers. Write #defines for the
|
||||
token symbols into FDEFINES if requested. */
|
||||
/* Assign the symbols their symbol numbers. */
|
||||
symbols_pack ();
|
||||
|
||||
/* Scan rule actions after invoking symbol_check_alias_consistency (in
|
||||
|
||||
@@ -631,7 +631,7 @@ handle_action_dollar (symbol_list *rule, char *text, location dollar_loc)
|
||||
if (!type_name
|
||||
&& !sym->content.sym->content->type_name)
|
||||
{
|
||||
if (union_seen | tag_seen)
|
||||
if (union_seen || tag_seen)
|
||||
{
|
||||
if (rule->midrule_parent_rule)
|
||||
complain (&dollar_loc, complaint,
|
||||
@@ -665,7 +665,7 @@ handle_action_dollar (symbol_list *rule, char *text, location dollar_loc)
|
||||
if (!type_name
|
||||
&& (!sym || !sym->content.sym->content->type_name))
|
||||
{
|
||||
if (union_seen | tag_seen)
|
||||
if (union_seen || tag_seen)
|
||||
complain (&dollar_loc, complaint,
|
||||
_("$%s of %s has no declared type"), cp,
|
||||
quote (effective_rule->content.sym->tag));
|
||||
|
||||
Reference in New Issue
Block a user