Lines Matching defs:rule
213 // A rule of the context-free grammar. Each rule can have an action attached to
260 Rule* rule(size_t index) const { return rules_[index].get(); }
263 void AddRule(const Rule& rule) {
264 rules_.push_back(std::make_unique<Rule>(rule));
276 // They consist of a (partially) matched rule, a marked position inside of the
277 // right-hand side of the rule (traditionally written as a dot) and an input
283 Item(const Rule* rule, size_t mark, size_t start, size_t pos)
284 : rule_(rule), mark_(mark), start_(start), pos_(pos) {
289 // matches the complete rule.
348 const Rule* rule() const { return rule_; }
368 return item->rule()->RunAction(item, tokens);
452 // The action MatchInput() produces the input matched by the rule as