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:
Akim Demaille
2000-10-02 07:53:36 +00:00
parent 6c89f1c138
commit d019d65507
4 changed files with 95 additions and 204 deletions

View File

@@ -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);