[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14-fyi-symbols-3.patch
From: |
Akim Demaille |
Subject: |
14-fyi-symbols-3.patch |
Date: |
Sat, 29 Dec 2001 15:14:23 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/gram.c, src/gram.h (sprec, sassoc): Remove.
Adjust all users to use symbols[i]->prec or ->assoc.
Index: src/conflicts.c
--- src/conflicts.c Fri, 28 Dec 2001 16:30:23 +0100 akim
+++ src/conflicts.c Fri, 28 Dec 2001 16:31:52 +0100 akim
@@ -122,7 +122,7 @@
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"));
Index: src/gram.c
--- src/gram.c Fri, 28 Dec 2001 16:30:23 +0100 akim
+++ src/gram.c Fri, 28 Dec 2001 16:31:05 +0100 akim
@@ -38,11 +38,9 @@
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;
Index: src/gram.h
--- src/gram.h Fri, 28 Dec 2001 16:24:40 +0100 akim
+++ src/gram.h Fri, 28 Dec 2001 16:31:25 +0100 akim
@@ -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
@@ -99,9 +99,6 @@
extern short *ritem;
extern int nritems;
-
-extern short *sprec;
-extern short *sassoc;
extern int start_symbol;
Index: src/reader.c
--- src/reader.c Fri, 28 Dec 2001 16:30:23 +0100 akim
+++ src/reader.c Fri, 28 Dec 2001 16:31:59 +0100 akim
@@ -1570,8 +1570,6 @@
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 @@
symbols[bp->value] = bp;
user_toknums[bp->value] = bp->user_token_number;
- sassoc[bp->value] = bp->assoc;
}
token_translations_init ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 14-fyi-symbols-3.patch,
Akim Demaille <=