Lines Matching refs:rule

36    The rules receive rule numbers 1 to NRULES in the order they are
38 initial rule, `$accept: START-SYMBOL $end', which is numbered 1,
39 all the user rules are 2, 3 etc. Each time a rule number is
40 presented to the user, we subtract 1, so *displayed* rule numbers
43 Internally, we cannot use the number 0 for a rule because for
44 instance RITEM stores both symbol (the RHS) and rule numbers: the
45 symbols are shorts >= 0, and rule number are stored negative.
46 Therefore 0 cannot be used, since it would be both the rule number
49 Actions are accessed via the rule number.
56 RULES[R].lhs -- the symbol of the left hand side of rule R.
59 for rule R.
78 RULES[R].useful -- true iff the rule is used (i.e., false if thrown
85 in the rule's right hand side. The last element in the portion
87 says which rule it is for.
89 The portions of RITEM come in order of increasing rule number.
100 as they ought to. Zero as a symbol or rule's precedence means none
175 /* The number of the rule in the source. It is usually the index in
179 /* The index in RULES. Usually the rule number in the source,
192 /* This symbol was attached to the rule via %prec. */
200 } rule;
202 extern rule *rules;
204 /* A function that selects a rule. */
205 typedef bool (*rule_filter) (rule *);
207 /* Return true IFF the rule has a `number' smaller than NRULES. That is, it is
209 bool rule_useful_in_grammar_p (rule *r);
211 /* Return true IFF the rule has a `number' higher than NRULES. That is, it is
213 bool rule_useless_in_grammar_p (rule *r);
215 /* Return true IFF the rule is not flagged as useful but is useful in the
217 bool rule_useless_in_parser_p (rule *r);
219 /* Print this rule's number and lhs on OUT. If a PREVIOUS_LHS was
220 already displayed (by a previous call for another rule), avoid
222 void rule_lhs_print (rule *r, symbol *previous_lhs, FILE *out);
223 void rule_lhs_print_xml (rule *r, FILE *out, int level);
226 int rule_rhs_length (rule *r);
228 /* Print this rule's RHS on OUT. */
229 void rule_rhs_print (rule *r, FILE *out);
231 /* Print this rule on OUT. */
232 void rule_print (rule *r, FILE *out);
251 /* Return the size of the longest rule RHS. */
267 MESSAGE (which can be `rule useless in grammar' when invoked after grammar
268 reduction, or `rule useless in parser due to conflicts' after conflicts