[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19-fyi-shift-numbers.patch
From: |
Akim Demaille |
Subject: |
19-fyi-shift-numbers.patch |
Date: |
Mon, 10 Dec 2001 09:36:50 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/state.h (shifts): Remove the `number' member: shifts are
attached to state, hence no longer need to be labelled with a
state number.
Index: src/LR0.c
--- src/LR0.c Sat, 08 Dec 2001 22:30:03 +0100 akim
+++ src/LR0.c Sat, 08 Dec 2001 22:31:24 +0100 akim
@@ -316,8 +316,6 @@
save_shifts (void)
{
shifts *p = shifts_new (nshifts);
-
- p->number = this_state->number;
shortcpy (p->shifts, shiftset, nshifts);
this_state->shifts = p;
}
@@ -339,7 +337,7 @@
shifts *sp;
statep = STATE_ALLOC (0);
- statep->number = nstates;
+ statep->number = nstates++;
/* The distinctive feature of this state from the
eof_shifting_state, is that it is labeled as post-start-symbol
@@ -354,7 +352,6 @@
/* Make a shift from this state to (what will be) the final state. */
sp = shifts_new (1);
statep->shifts = sp;
- sp->number = nstates++;
sp->shifts[0] = nstates;
}
@@ -375,7 +372,7 @@
next-to-final state.
The symbol for that shift is 0 (end-of-file). */
statep = STATE_ALLOC (0);
- statep->number = nstates;
+ statep->number = nstates++;
last_state->next = statep;
last_state = statep;
@@ -383,7 +380,6 @@
/* Make the shift from the final state to the termination state. */
sp = shifts_new (1);
statep->shifts = sp;
- sp->number = nstates++;
sp->shifts[0] = nstates;
}
@@ -459,7 +455,6 @@
shifts *sp = statep->shifts;
shifts *sp1 = shifts_new (sp->nshifts + 1);
- sp1->number = statep->number;
statep->shifts = sp1;
sp1->shifts[0] = nstates;
for (i = sp->nshifts; i > 0; i--)
Index: src/state.h
--- src/state.h Sat, 08 Dec 2001 22:30:03 +0100 akim
+++ src/state.h Sat, 08 Dec 2001 22:30:22 +0100 akim
@@ -95,7 +95,6 @@
typedef struct shifts
{
- short number;
short nshifts;
short shifts[1];
} shifts;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 19-fyi-shift-numbers.patch,
Akim Demaille <=