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.
2001-12-29 Akim Demaille <akim@epita.fr>
* src/reader.c, src/reader.h (tags): Remove.
For right association, keep only the shift.
For nonassociation, keep neither. */
For right association, keep only the shift.
For nonassociation, keep neither. */
+ switch (symbols[i]->assoc)
{
case right_assoc:
log_resolution (state, lookahead, i, _("shift"));
{
case right_assoc:
log_resolution (state, lookahead, i, _("shift"));
rule_t *rule_table = NULL;
short *rprec = NULL;
short *rprecsym = NULL;
rule_t *rule_table = NULL;
short *rprec = NULL;
short *rprecsym = NULL;
struct bucket **symbols = NULL;
struct bucket **symbols = NULL;
-short *sprec = NULL;
-short *rassoc = NULL;
-short *sassoc = NULL;
short *token_translations = NULL;
int start_symbol;
short *token_translations = NULL;
int start_symbol;
Item numbers are used in the finite state machine to represent
places that parsing can get to.
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
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 *ritem;
extern int nritems;
-extern short *sprec;
-extern short *sassoc;
-
extern int start_symbol;
/* associativity values in elements of rassoc, sassoc. */
extern int start_symbol;
/* associativity values in elements of rassoc, sassoc. */
user_toknums = XCALLOC (short, nsyms + 1);
symbols = XCALLOC (bucket *, nsyms);
user_toknums = XCALLOC (short, nsyms + 1);
symbols = XCALLOC (bucket *, nsyms);
- sassoc = XCALLOC (short, nsyms);
-
max_user_token_number = 256;
last_user_token_number = 256;
max_user_token_number = 256;
last_user_token_number = 256;
symbols[bp->value] = bp;
user_toknums[bp->value] = bp->user_token_number;
symbols[bp->value] = bp;
user_toknums[bp->value] = bp->user_token_number;
- sassoc[bp->value] = bp->assoc;
}
token_translations_init ();
}
token_translations_init ();