/[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.31 by akim, Sun Jun 30 17:28:44 2002 UTC revision 1.32 by akim, Sun Jun 30 17:29:36 2002 UTC
# Line 44  Line 44 
44     Each core contains a vector of NITEMS items which are the indices     Each core contains a vector of NITEMS items which are the indices
45     in the RITEMS vector of the items that are selected in this state.     in the RITEMS vector of the items that are selected in this state.
46    
    The link field is used for chaining symbols that hash states by  
    their itemsets.  This is for recognizing equivalent states and  
    combining them when the states are generated.  
   
47     The two types of transitions are shifts (push the lookahead token     The two types of transitions are shifts (push the lookahead token
48     and read another) and reductions (combine the last n things on the     and read another) and reductions (combine the last n things on the
49     stack via a rule, replace them with the symbol that the rule     stack via a rule, replace them with the symbol that the rule
# Line 180  reductions *reductions_new PARAMS ((int Line 176  reductions *reductions_new PARAMS ((int
176  typedef struct state_s  typedef struct state_s
177  {  {
178    struct state_s *next;    struct state_s *next;
   struct state_s *link;  
179    
180    state_number_t number;    state_number_t number;
181    symbol_number_t accessing_symbol;    symbol_number_t accessing_symbol;
# Line 220  state_t *state_new PARAMS ((symbol_numbe Line 215  state_t *state_new PARAMS ((symbol_numbe
215  void state_rule_lookaheads_print PARAMS ((state_t *state, rule_t *rule,  void state_rule_lookaheads_print PARAMS ((state_t *state, rule_t *rule,
216                                            FILE *out));                                            FILE *out));
217    
218    /* Create/destroy the states hash table.  */
219    void state_hash_new PARAMS ((void));
220    void state_hash_free PARAMS ((void));
221    
222    /* Find the state associated to the CORE, and return it.  If it does
223       not exist yet, return NULL.  */
224    state_t *state_hash_lookup PARAMS ((size_t core_size, item_number_t *core));
225    
226    /* Insert STATE in the state hash table.  */
227    void state_hash_insert PARAMS ((state_t *state));
228    
229    /* All the states, indexed by the state number.  */
230    extern state_t **states;
231    
232    /* Free all the states.  */
233    void states_free PARAMS ((void));
234  #endif /* !STATE_H_ */  #endif /* !STATE_H_ */

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

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