mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +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>
|
2001-12-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/reader.c, src/reader.h (tags): Remove.
|
* 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 right association, keep only the shift.
|
||||||
For nonassociation, keep neither. */
|
For nonassociation, keep neither. */
|
||||||
|
|
||||||
switch (sassoc[i])
|
switch (symbols[i]->assoc)
|
||||||
{
|
{
|
||||||
case right_assoc:
|
case right_assoc:
|
||||||
log_resolution (state, lookahead, i, _("shift"));
|
log_resolution (state, lookahead, i, _("shift"));
|
||||||
|
|||||||
@@ -38,11 +38,9 @@ int nritems;
|
|||||||
rule_t *rule_table = NULL;
|
rule_t *rule_table = NULL;
|
||||||
short *rprec = NULL;
|
short *rprec = NULL;
|
||||||
short *rprecsym = NULL;
|
short *rprecsym = NULL;
|
||||||
|
short *rassoc = NULL;
|
||||||
|
|
||||||
struct bucket **symbols = NULL;
|
struct bucket **symbols = NULL;
|
||||||
short *sprec = NULL;
|
|
||||||
short *rassoc = NULL;
|
|
||||||
short *sassoc = NULL;
|
|
||||||
short *token_translations = NULL;
|
short *token_translations = NULL;
|
||||||
|
|
||||||
int start_symbol;
|
int start_symbol;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
Item numbers are used in the finite state machine to represent
|
Item numbers are used in the finite state machine to represent
|
||||||
places that parsing can get to.
|
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
|
Precedence levels are assigned in increasing order starting with 1
|
||||||
so that numerically higher precedence values mean tighter binding
|
so that numerically higher precedence values mean tighter binding
|
||||||
@@ -100,9 +100,6 @@ extern int nvars;
|
|||||||
extern short *ritem;
|
extern short *ritem;
|
||||||
extern int nritems;
|
extern int nritems;
|
||||||
|
|
||||||
extern short *sprec;
|
|
||||||
extern short *sassoc;
|
|
||||||
|
|
||||||
extern int start_symbol;
|
extern int start_symbol;
|
||||||
|
|
||||||
/* associativity values in elements of rassoc, sassoc. */
|
/* associativity values in elements of rassoc, sassoc. */
|
||||||
|
|||||||
@@ -1570,8 +1570,6 @@ packsymbols (void)
|
|||||||
user_toknums = XCALLOC (short, nsyms + 1);
|
user_toknums = XCALLOC (short, nsyms + 1);
|
||||||
symbols = XCALLOC (bucket *, nsyms);
|
symbols = XCALLOC (bucket *, nsyms);
|
||||||
|
|
||||||
sassoc = XCALLOC (short, nsyms);
|
|
||||||
|
|
||||||
max_user_token_number = 256;
|
max_user_token_number = 256;
|
||||||
last_user_token_number = 256;
|
last_user_token_number = 256;
|
||||||
|
|
||||||
@@ -1643,7 +1641,6 @@ packsymbols (void)
|
|||||||
|
|
||||||
symbols[bp->value] = bp;
|
symbols[bp->value] = bp;
|
||||||
user_toknums[bp->value] = bp->user_token_number;
|
user_toknums[bp->value] = bp->user_token_number;
|
||||||
sassoc[bp->value] = bp->assoc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
token_translations_init ();
|
token_translations_init ();
|
||||||
|
|||||||
Reference in New Issue
Block a user