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

Diff of /bison/src/gram.h

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

revision 1.24 by akim, Sun Apr 7 17:41:28 2002 UTC revision 1.25 by akim, Sun Apr 7 17:42:31 2002 UTC
# Line 54  Line 54 
54    
55     RULES is an array of struct rule_s, which members are:     RULES is an array of struct rule_s, which members are:
56    
57     RULES[R].lhs -- the symbol number of the left hand side of rule R.     RULES[R].lhs -- the symbol of the left hand side of rule R.
    If -1, the rule has been thrown out by reduce.c and should be  
    ignored.  
58    
59     RULES[R].rhs -- the index in RITEM of the beginning of the portion     RULES[R].rhs -- the index in RITEM of the beginning of the portion
60     for rule R.     for rule R.
61    
62     RULES[R].prec -- the precedence level of R.     RULES[R].prec -- the symbol providing the precedence level of R.
63    
64     RULES[R].precsym -- the symbol-number of the symbol in %prec for R     RULES[R].precsym -- the symbol attached (via %prec) to give its
65     (if any).     precedence to R.  Of course, if set, it is equal to `prec', but we
66       need to distinguish one from the other when reducing: a symbol used
67       in a %prec is not useless.
68    
69     RULES[R].assoc -- the associativity of R.     RULES[R].assoc -- the associativity of R.
70    
71     RULES[R].line -- the line where R was defined.     RULES[R].line -- the line where R was defined.
72    
73     RULES[R].useful -- TRUE iff the rule is used.     RULES[R].useful -- TRUE iff the rule is used (i.e., FALSE if thrown
74       away by reduce).
75    
76     The right hand side is stored as symbol numbers in a portion of     The right hand side is stored as symbol numbers in a portion of
77     RITEM.     RITEM.
# Line 126  typedef struct rule_s Line 127  typedef struct rule_s
127    
128    bucket *lhs;    bucket *lhs;
129    short *rhs;    short *rhs;
130    short prec;  
131    short precsym;    /* This symbol provides both the associativity, and the precedence. */
132    associativity assoc;    bucket *prec;
133    
134      /* This symbol was attached to the rule via %prec. */
135      bucket *precsym;
136    
137    short line;    short line;
138    bool useful;    bool useful;
139    

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

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