mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
user_toknums' is output as a short[]' in `output.c', while it is
defined as a `int[]' in `reader.c'. For consistency with the other output tables, `user_toknums' is now defined as a table of shorts. * src/reader.c (user_toknums): Be a short table instead of an int table. Adjust dependencies. Factor the short table outputs. * src/output.c (output_short_table): New function. * src/output.c (output_gram, output_stos, output_rule_data) (output_base, output_table, output_check): Use it.
This commit is contained in:
10
src/reader.c
10
src/reader.c
@@ -118,7 +118,7 @@ static int get_type PARAMS((void));
|
||||
|
||||
int lineno;
|
||||
char **tags;
|
||||
int *user_toknums;
|
||||
short *user_toknums;
|
||||
static symbol_list *grammar;
|
||||
static int start_flag;
|
||||
static bucket *startval;
|
||||
@@ -296,8 +296,10 @@ copy_comment2 (FILE *in, FILE *out1, FILE* out2, int c)
|
||||
}
|
||||
|
||||
|
||||
/* Dump the comment from FIN to FOUT. C is either `*' or `/',
|
||||
depending upon the type of comments used. */
|
||||
/*------------------------------------------------------------.
|
||||
| Dump the comment from FIN to FOUT. C is either `*' or `/', |
|
||||
| depending upon the type of comments used. |
|
||||
`------------------------------------------------------------*/
|
||||
|
||||
static inline void
|
||||
copy_comment (FILE *fin, FILE *fout, int c)
|
||||
@@ -1737,7 +1739,7 @@ packsymbols (void)
|
||||
|
||||
tags = NEW2(nsyms + 1, char *);
|
||||
tags[0] = DOLLAR;
|
||||
user_toknums = NEW2(nsyms + 1, int);
|
||||
user_toknums = NEW2(nsyms + 1, short);
|
||||
user_toknums[0] = 0;
|
||||
|
||||
sprec = NEW2(nsyms, short);
|
||||
|
||||
Reference in New Issue
Block a user