Lines Matching refs:position

335     private static function _getLongestAlternateChain($args, $position, $tokDef, $stopAt=-1) {  argument
337 for ($lastFound = $position; $lastFound < count($args); $lastFound += 2) {
350 private static function _isMatchingAlternateChain($args, $position, $tokDefs) { argument
352 …for ($lastFound = $position; $lastFound < count($args) && $tokDefIdx < count($tokDefs); $lastFound…
362 private static function _getWrappedSequence($args, $position, $tokDefs, $nested) { argument
367 if ($args[$position]->definition() != $openTokDef) {
371 for ($i = $position + 1; $i < count($args); ++$i) {
374 return $i - $position + 1;
383 private static function _extractAlternateChain($args, $position, $length) { argument
385 for ($i = $position; $i < count($args) && count($retval) < $length; $i += 2) {
461 public function trySpliceAt(&$args, &$position) { argument
464 if ($args[$position]->definition() == $this->tokenDefs()[0]) {
465 $position = self::_spliceNone($args, $position, $this);
471 … $chainLength = self::_getLongestAlternateChain($args, $position, $this->tokenDefs()[0]);
473 $position = self::_splicePrefix($args, $position, $chainLength, $this);
477 …$chainLength = self::_getLongestAlternateChain($args, $position, $this->tokenDefs()[0], $this->ari…
479 $position = self::_splicePrefix($args, $position, $chainLength, $this);
482 } else if (self::_isMatchingAlternateChain($args, $position, $this->tokenDefs())) {
483 $position = self::_splicePrefix($args, $position, $this->arity(), $this);
489 … $chainLength = self::_getLongestAlternateChain($args, $position + 1, $this->tokenDefs()[0]);
491 $position = self::_splicePostfix($args, $position + 1, $chainLength, $this);
495 …$chainLength = self::_getLongestAlternateChain($args, $position + 1, $this->tokenDefs()[0], $this-…
497 $position = self::_splicePostfix($args, $position + 1, $chainLength, $this);
500 … } else if (self::_isMatchingAlternateChain($args, $position + 1, $this->tokenDefs())) {
501 $position = self::_splicePostfix($args, $position + 1, $this->arity(), $this);
507 … $chainLength = self::_getLongestAlternateChain($args, $position + 1, $this->tokenDefs()[0]);
509 $position = self::_spliceInfix($args, $position + 1, $chainLength, $this);
513 …$chainLength = self::_getLongestAlternateChain($args, $position + 1, $this->tokenDefs()[0], $this-…
515 $position = self::_spliceInfix($args, $position + 1, $chainLength, $this);
518 … } else if (self::_isMatchingAlternateChain($args, $position + 1, $this->tokenDefs())) {
519 $position = self::_spliceInfix($args, $position + 1, $this->arity() - 1, $this);
524 …$sequenceLength = self::_getWrappedSequence($args, $position, $this->tokenDefs(), $this->nested());
526 $position = self::_spliceWrap($args, $position, $sequenceLength, $this);
529 throw new UnmatchedWrapperException($this, $args[$position]);