/[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.40 by akim, Mon Jul 29 17:31:46 2002 UTC revision 1.41 by akim, Thu Aug 1 18:14:30 2002 UTC
# Line 82  Line 82 
82  #ifndef STATE_H_  #ifndef STATE_H_
83  # define STATE_H_  # define STATE_H_
84    
85  # include "bitsetv.h"  # include "bitset.h"
86    
87    
88  /*-------------------.  /*-------------------.
# Line 178  errs_t *errs_new PARAMS ((int num, symbo Line 178  errs_t *errs_new PARAMS ((int num, symbo
178  typedef struct reductions_s  typedef struct reductions_s
179  {  {
180    short num;    short num;
181      bitset *lookaheads;
182    rule_t *rules[1];    rule_t *rules[1];
183  } reductions_t;  } reductions_t;
184    
# Line 198  struct state_s Line 199  struct state_s
199    /* Nonzero if no lookahead is needed to decide what to do in state S.  */    /* Nonzero if no lookahead is needed to decide what to do in state S.  */
200    char consistent;    char consistent;
201    
   /* Used in LALR, not LR(0).  
   
      When a state is not consistent (there is an S/R or R/R conflict),  
      lookaheads are needed to enable the reductions.  NLOOKAHEADS is  
      the number of lookahead guarded reductions of the  
      LOOKAHEADS_RULE.  For each rule LOOKAHEADS_RULE[R], LOOKAHEADS[R]  
      is the bitset of the lookaheads enabling this reduction.  */  
   int nlookaheads;  
   bitsetv lookaheads;  
   rule_t **lookaheads_rule;  
   
202    /* If some conflicts were solved thanks to precedence/associativity,    /* If some conflicts were solved thanks to precedence/associativity,
203       a human readable description of the resolution.  */       a human readable description of the resolution.  */
204    const char *solved_conflicts;    const char *solved_conflicts;
# Line 234  void state_transitions_set PARAMS ((stat Line 224  void state_transitions_set PARAMS ((stat
224  void state_reductions_set PARAMS ((state_t *state,  void state_reductions_set PARAMS ((state_t *state,
225                                     int num, rule_t **reductions));                                     int num, rule_t **reductions));
226    
227    int state_reduction_find PARAMS ((state_t *state, rule_t *rule));
228    
229  /* Set the errs of STATE.  */  /* Set the errs of STATE.  */
230  void state_errs_set PARAMS ((state_t *state,  void state_errs_set PARAMS ((state_t *state,
231                               int num, symbol_t **errs));                               int num, symbol_t **errs));

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

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