mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
* src/gram.c, src/gram.h (sprec, sassoc): Remove.
Adjust all users to use symbols[i]->prec or ->assoc.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
||||
@@ -122,7 +122,7 @@ resolve_sr_conflict (state_t *state, int lookahead)
|
||||
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"));
|
||||
|
||||
@@ -38,11 +38,9 @@ int nritems;
|
||||
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;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
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
|
||||
@@ -100,9 +100,6 @@ extern int nvars;
|
||||
extern short *ritem;
|
||||
extern int nritems;
|
||||
|
||||
extern short *sprec;
|
||||
extern short *sassoc;
|
||||
|
||||
extern int start_symbol;
|
||||
|
||||
/* associativity values in elements of rassoc, sassoc. */
|
||||
|
||||
@@ -1570,8 +1570,6 @@ packsymbols (void)
|
||||
user_toknums = XCALLOC (short, nsyms + 1);
|
||||
symbols = XCALLOC (bucket *, nsyms);
|
||||
|
||||
sassoc = XCALLOC (short, nsyms);
|
||||
|
||||
max_user_token_number = 256;
|
||||
last_user_token_number = 256;
|
||||
|
||||
@@ -1643,7 +1641,6 @@ packsymbols (void)
|
||||
|
||||
symbols[bp->value] = bp;
|
||||
user_toknums[bp->value] = bp->user_token_number;
|
||||
sassoc[bp->value] = bp->assoc;
|
||||
}
|
||||
|
||||
token_translations_init ();
|
||||
|
||||
Reference in New Issue
Block a user