101 |
| Shifts. | |
| Shifts. | |
102 |
`---------*/ |
`---------*/ |
103 |
|
|
104 |
typedef struct shifts |
typedef struct shifts_s |
105 |
{ |
{ |
106 |
short nshifts; |
short nshifts; |
107 |
state_number_t shifts[1]; |
state_number_t shifts[1]; |
108 |
} shifts; |
} shifts_t; |
|
|
|
|
shifts *shifts_new PARAMS ((int n)); |
|
109 |
|
|
110 |
|
|
111 |
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can |
/* What is the symbol which is shifted by SHIFTS->shifts[Shift]? Can |
173 |
|
|
174 |
typedef struct state_s |
typedef struct state_s |
175 |
{ |
{ |
|
struct state_s *next; |
|
|
|
|
176 |
state_number_t number; |
state_number_t number; |
177 |
symbol_number_t accessing_symbol; |
symbol_number_t accessing_symbol; |
178 |
shifts *shifts; |
shifts_t *shifts; |
179 |
reductions *reductions; |
reductions *reductions; |
180 |
errs *errs; |
errs *errs; |
181 |
|
|
201 |
extern state_t *final_state; |
extern state_t *final_state; |
202 |
|
|
203 |
/* Create a new state with ACCESSING_SYMBOL for those items. */ |
/* Create a new state with ACCESSING_SYMBOL for those items. */ |
|
|
|
204 |
state_t *state_new PARAMS ((symbol_number_t accessing_symbol, |
state_t *state_new PARAMS ((symbol_number_t accessing_symbol, |
205 |
size_t core_size, item_number_t *core)); |
size_t core_size, item_number_t *core)); |
206 |
|
|
207 |
|
/* Set the shifts of STATE. */ |
208 |
|
void state_shifts_set PARAMS ((state_t *state, |
209 |
|
int nshifts, state_number_t *shifts)); |
210 |
|
|
211 |
/* Print on OUT all the lookaheads such that this STATE wants to |
/* Print on OUT all the lookaheads such that this STATE wants to |
212 |
reduce this RULE. */ |
reduce this RULE. */ |
|
|
|
213 |
void state_rule_lookaheads_print PARAMS ((state_t *state, rule_t *rule, |
void state_rule_lookaheads_print PARAMS ((state_t *state, rule_t *rule, |
214 |
FILE *out)); |
FILE *out)); |
215 |
|
|