Adjust all users to use symbols[i]->prec or ->assoc.
2001-12-29 Akim Demaille <akim@epita.fr>
+ * src/gram.c, src/gram.h (sprec, sassoc): Remove.
+ Adjust all users to use symbols[i]->prec or ->assoc.
+
+
+2001-12-29 Akim Demaille <akim@epita.fr>
+
* src/reader.c, src/reader.h (tags): Remove.
Adjust all users to use symbols[i]->tag.
For right association, keep only the shift.
For nonassociation, keep neither. */
- switch (sassoc[i])
+ switch (symbols[i]->assoc)
{
case right_assoc:
log_resolution (state, lookahead, i, _("shift"));
rule_t *rule_table = NULL;
short *rprec = NULL;
short *rprecsym = NULL;
+short *rassoc = NULL;
struct bucket **symbols = NULL;
-short *sprec = NULL;
-short *rassoc = NULL;
-short *sassoc = NULL;
short *token_translations = NULL;
int start_symbol;
Item numbers are used in the finite state machine to represent
places that parsing can get to.
- SPREC records the precedence level of each symbol.
+ SYMBOLS[I]->PREC records the precedence level of each symbol.
Precedence levels are assigned in increasing order starting with 1
so that numerically higher precedence values mean tighter binding
extern short *ritem;
extern int nritems;
-extern short *sprec;
-extern short *sassoc;
-
extern int start_symbol;
/* associativity values in elements of rassoc, sassoc. */
user_toknums = XCALLOC (short, nsyms + 1);
symbols = XCALLOC (bucket *, nsyms);
- sassoc = XCALLOC (short, nsyms);
-
max_user_token_number = 256;
last_user_token_number = 256;
symbols[bp->value] = bp;
user_toknums[bp->value] = bp->user_token_number;
- sassoc[bp->value] = bp->assoc;
}
token_translations_init ();