Lines Matching refs:rule
151 foreach ($this->_rules as $name => $rule) {
154 if ($rule instanceof Compiler\Llk\Rule\Repetition) {
155 $min = $rule->getMin();
157 $max = -1 == $rule->getMax() ? 2 : $rule->getMax();
168 } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
169 for ($i = 0, $max = count($rule->getChildren()); $i < $max; ++$i) {
260 protected function coverage(Compiler\Llk\Rule $rule) argument
262 $children = $rule->getChildren();
264 if ($rule instanceof Compiler\Llk\Rule\Repetition) {
269 foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
293 $rule->getName(),
298 $rule->getName(),
329 $this->_coveredRules[$rule->getName()][$rand] = -1;
331 $rule->getName(),
336 $rule->getName(),
350 } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
355 foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
367 $rule->getName(),
398 $rule->getName(),
404 $rule->getName(),
408 $this->_coveredRules[$rule->getName()][$rand] = -1;
410 $rule->getName(),
421 } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
422 $this->_coveredRules[$rule->getName()][0] = -1;
424 $rule->getName(),
428 $rule->getName(),
441 } elseif ($rule instanceof Compiler\Llk\Rule\Token) {
443 $rule->getName(),
446 $this->_trace[] = $rule;
448 $rule->getName(),
468 foreach ($rules as $rule) {
474 $t->getRule() == $rule) {
482 $t->getRule() == $rule) {
494 foreach ($rules as $rule) {
500 $t->getRule() == $rule) {
508 $t->getRule() == $rule) {
535 $rule = $this->_rules[$pop->getRule()];
536 $found = $rule instanceof Compiler\Llk\Rule\Choice ||
537 $rule instanceof Compiler\Llk\Rule\Repetition;
567 $rule = $this->_rules[$ruleName];
568 $children = $rule->getChildren();
570 if ($rule instanceof Compiler\Llk\Rule\Repetition) {
587 } elseif ($rule instanceof Compiler\Llk\Rule\Choice) {
594 } elseif ($rule instanceof Compiler\Llk\Rule\Concatenation) {
605 } elseif ($rule instanceof Compiler\Llk\Rule\Token) {