/[bison]/bison/src/state.h
ViewVC logotype

Diff of /bison/src/state.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by akim, Wed Dec 5 09:30:00 2001 UTC revision 1.8 by akim, Wed Dec 5 09:31:46 2001 UTC
# Line 124  typedef struct shifts Line 124  typedef struct shifts
124    (shifts *) xcalloc ((unsigned) (sizeof (shifts)                       \    (shifts *) xcalloc ((unsigned) (sizeof (shifts)                       \
125                                    + (Nshifts - 1) * sizeof (short)), 1)                                    + (Nshifts - 1) * sizeof (short)), 1)
126    
127    /* What is the symbol which is shifted by SHIFTS->shifts[Shift]?  Can
128       be a token (amongst which the error token), or non terminals in
129       case of gotos.  */
130    
131    #define SHIFT_SYMBOL(Shifts, Shift) \
132      (state_table[Shifts->shifts[Shift]].accessing_symbol)
133    
134  /* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */  /* Is the SHIFTS->shifts[Shift] a real shift? (as opposed to gotos.) */
135    
136  #define SHIFT_IS_SHIFT(Shifts, Shift) \  #define SHIFT_IS_SHIFT(Shifts, Shift) \
137    (ISTOKEN (state_table[Shifts->shifts[Shift]].accessing_symbol))    (ISTOKEN (SHIFT_SYMBOL (Shifts, Shift)))
138    
139  /* Is the SHIFTS->shifts[Shift] a goto?. */  /* Is the SHIFTS->shifts[Shift] a goto?. */
140    
# Line 137  typedef struct shifts Line 144  typedef struct shifts
144  /* Is the SHIFTS->shifts[Shift] then handling of the error token?. */  /* Is the SHIFTS->shifts[Shift] then handling of the error token?. */
145    
146  #define SHIFT_IS_ERROR(Shifts, Shift) \  #define SHIFT_IS_ERROR(Shifts, Shift) \
147    (state_table[Shifts->shifts[Shift]].accessing_symbol == error_token_number)    (SHIFT_SYMBOL (Shifts, Shift) == error_token_number)
148    
149    
150  /*-------.  /*-------.

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26