-#define SHIFT_DISABLE(Shifts, Shift) \
- (Shifts->shifts[Shift] = 0)
+# define TRANSITION_DISABLE(Transitions, Num) \
+ (Transitions->states[Num] = NULL)
+
+# define TRANSITION_IS_DISABLED(Transitions, Num) \
+ (Transitions->states[Num] == NULL)
+
+
+/* Iterate over each transition over a token (shifts). */
+# define FOR_EACH_SHIFT(Transitions, Iter) \
+ for (Iter = 0; \
+ Iter < Transitions->num \
+ && (TRANSITION_IS_DISABLED (Transitions, Iter) \
+ || TRANSITION_IS_SHIFT (Transitions, Iter)); \
+ ++Iter) \
+ if (!TRANSITION_IS_DISABLED (Transitions, Iter))
+