style: rename user_token_number as code

This should have been done in 3.6, but I wanted to avoid introducing
conflicts into Vincent's work on counterexamples.  It turns out it's
completely orthogonal.

* data/README.md, data/skeletons/bison.m4, data/skeletons/c++.m4,
* data/skeletons/c.m4, data/skeletons/glr.c, data/skeletons/java.m4,
* data/skeletons/lalr1.d, data/skeletons/lalr1.java,
* data/skeletons/variant.hh, data/skeletons/yacc.c, src/conflicts.c,
* src/derives.c, src/gram.c, src/gram.h, src/output.c,
* src/parse-gram.c, src/parse-gram.y, src/print-xml.c, src/print.c,
* src/reader.c, src/symtab.c, src/symtab.h, tests/input.at,
* tests/types.at:
s/user_token_number/code/g.
Plus minor changes.
This commit is contained in:
Akim Demaille
2020-05-22 20:12:03 +02:00
parent 339d11badf
commit e7aff57122
25 changed files with 88 additions and 95 deletions

View File

@@ -149,21 +149,13 @@ struct sym_content
int prec;
assoc assoc;
/** The user specified token number.
E.g., %token FOO 42.*/
int user_token_number;
/** Token code, possibly specified by the user (%token FOO 42). */
int code;
symbol_class class;
declaration_status status;
};
/** Undefined user number. */
# define USER_NUMBER_UNDEFINED -1
/* Undefined internal token number. */
# define NUMBER_UNDEFINED (-1)
/** Fetch (or create) the symbol associated to KEY. */
symbol *symbol_from_uniqstr (const uniqstr key, location loc);
@@ -235,8 +227,8 @@ void symbol_precedence_set (symbol *sym, int prec, assoc a, location loc);
void symbol_class_set (symbol *sym, symbol_class class, location loc,
bool declaring);
/** Set the \c user_token_number associated with \c sym. */
void symbol_user_token_number_set (symbol *sym, int user_number, location loc);
/** Set the \c code associated with \c sym. */
void symbol_code_set (symbol *sym, int code, location loc);