Adjust all users to use symbols[i]->user_token_number.
+2001-12-29 Akim Demaille <akim@epita.fr>
+
+ * src/reader.c, src/reader.h (user_toknums): Remove.
+ Adjust all users to use symbols[i]->user_token_number.
+
+
2001-12-29 Akim Demaille <akim@epita.fr>
* src/gram.c, src/gram.h (sprec, sassoc): Remove.
muscle_insert ("tname", obstack_finish (&format_obstack));
/* Output YYTOKNUM. */
- output_table_data (&format_obstack, user_toknums,
- 0, 1, ntokens + 1);
- muscle_insert ("toknum", obstack_finish (&format_obstack));
+ {
+ short *values = XCALLOC (short, ntokens + 1);
+ for (i = 0; i < ntokens + 1; ++i)
+ values[i] = symbols[i]->user_token_number;
+ output_table_data (&format_obstack, values,
+ 0, 1, ntokens + 1);
+ muscle_insert ("toknum", obstack_finish (&format_obstack));
+ XFREE (values);
+ }
+
/* Output YYR1. */
{
if (semantic_parser)
output_stos ();
output_rule_data ();
- XFREE (user_toknums);
output_actions ();
prepare ();
} symbol_list;
int lineno;
-short *user_toknums;
static symbol_list *grammar;
static int start_flag;
static bucket *startval;
int tokno = 1;
int last_user_token_number;
- user_toknums = XCALLOC (short, nsyms + 1);
symbols = XCALLOC (bucket *, nsyms);
max_user_token_number = 256;
}
symbols[bp->value] = bp;
- user_toknums[bp->value] = bp->user_token_number;
}
token_translations_init ();
extern int lineno;
-extern short *user_toknums;
#endif /* !READER_H_ */