Lines Matching refs:this

116         return $this->_current;
126 return $this->_key;
146 $this->_key = -1;
147 $this->_current = null;
148 $this->_tests = [];
149 $this->_coveredRules = [];
151 foreach ($this->_rules as $name => $rule) {
152 $this->_coveredRules[$name] = [];
161 $this->_coveredRules[$name][$min] = 0;
163 $this->_coveredRules[$name][$min] = 0;
164 $this->_coveredRules[$name][$min1] = 0;
165 $this->_coveredRules[$name][$max1] = 0;
166 $this->_coveredRules[$name][$max] = 0;
170 $this->_coveredRules[$name][$i] = 0;
173 $this->_coveredRules[$name][0] = 0;
187 $ruleName = $this->_rootRuleName;
189 if (true !== in_array(0, $this->_coveredRules[$ruleName]) &&
190 true !== in_array(.5, $this->_coveredRules[$ruleName])) {
194 $this->_trace = [];
195 $this->_todo = [new Compiler\Llk\Rule\Entry(
197 $this->_coveredRules
200 $result = $this->unfold();
208 foreach ($this->_trace as $trace) {
210 $handle .= $this->generateToken($trace);
214 ++$this->_key;
215 $this->_current = $handle;
216 $this->_tests[] = $this->_trace;
218 foreach ($this->_coveredRules as $key => $value) {
221 $this->_coveredRules[$key][$k] = 0;
236 while (0 < count($this->_todo)) {
237 $pop = array_pop($this->_todo);
240 $this->_trace[] = $pop;
241 $this->updateCoverage($pop);
243 $out = $this->coverage($this->_rules[$pop->getRule()]);
245 if (true !== $out && true !== $this->backtrack()) {
269 foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
292 $this->_trace[] = new Compiler\Llk\Rule\Entry(
294 $this->_coveredRules,
295 $this->_todo
297 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
302 if ($this->_rules[$children] instanceof Compiler\Llk\Rule\Token) {
304 $this->_todo[] = new Compiler\Llk\Rule\Entry(
306 $this->_coveredRules,
307 $this->_todo
311 $sequence = $this->extract([$children]);
319 $this->_trace[] = $seq;
322 $this->updateCoverage($seq);
329 $this->_coveredRules[$rule->getName()][$rand] = -1;
330 $this->_trace[] = new Compiler\Llk\Rule\Entry(
332 $this->_coveredRules,
333 $this->_todo
335 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
341 $this->_todo[] = new Compiler\Llk\Rule\Entry(
343 $this->_coveredRules,
344 $this->_todo
355 foreach ($this->_coveredRules[$rule->getName()] as $child => $value) {
366 $this->_trace[] = new Compiler\Llk\Rule\Entry(
368 $this->_coveredRules,
369 $this->_todo
371 $sequence = $this->extract($children);
378 $this->_trace[] = $seq;
381 $this->updateCoverage($seq);
397 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
403 $this->_trace[] = new Compiler\Llk\Rule\Entry(
405 $this->_coveredRules,
406 $this->_todo
408 $this->_coveredRules[$rule->getName()][$rand] = -1;
409 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
413 $this->_todo[] = new Compiler\Llk\Rule\Entry(
415 $this->_coveredRules,
416 $this->_todo
422 $this->_coveredRules[$rule->getName()][0] = -1;
423 $this->_trace[] = new Compiler\Llk\Rule\Entry(
427 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
433 $this->_todo[] = new Compiler\Llk\Rule\Entry(
436 $this->_todo
442 $this->_trace[] = new Compiler\Llk\Rule\Entry(
446 $this->_trace[] = $rule;
447 $this->_todo[] = new Compiler\Llk\Rule\Ekzit(
469 foreach ($this->_tests as $test) {
498 foreach ($this->_trace as $t) {
532 $pop = array_pop($this->_trace);
535 $rule = $this->_rules[$pop->getRule()];
539 } while (0 < count($this->_trace) && false === $found);
546 $this->_covered = $pop->getData();
547 $this->_todo = $pop->getTodo();
548 $this->_todo[] = new Compiler\Llk\Rule\Entry(
550 $this->_covered,
551 $this->_todo
567 $rule = $this->_rules[$ruleName];
572 $this->_coveredRules[$ruleName][$child] = 1;
574 if (true === $this->allCovered($children) ||
575 true === $this->checkRuleRoot($children)) {
576 $this->_coveredRules[$ruleName][$child] = 1;
578 foreach ($this->_coveredRules[$ruleName] as $child => $value) {
580 $this->_coveredRules[$ruleName][$child] = 1;
584 $this->_coveredRules[$ruleName][$child] = .5;
588 if (true === $this->allCovered($children[$child]) ||
589 true === $this->checkRuleRoot($children[$child])) {
590 $this->_coveredRules[$ruleName][$child] = 1;
592 $this->_coveredRules[$ruleName][$child] = .5;
598 if (false === $this->allCovered($children[$i]) &&
599 false === $this->checkRuleRoot($children[$i])) {
604 $this->_coveredRules[$ruleName][0] = true === $isCovered ? 1 : .5;
606 $this->_coveredRules[$ruleName][0] = 1;
620 foreach ($this->_coveredRules[$ruleName] as $value) {
637 if (true === $this->_rules[$ruleName]->isTransitional()) {
641 $i = count($this->_trace) - 1;
645 $lastRule = $this->_trace[$i];