Do Transition from B

@return self Fluent Interface
197361
private function doTransitionFromB() : self
    {
        if ($this->getToken() === Grammar::T_V) {
            $this
                ->setState(self::STATE_A)
                ->addPosition(1)
                ->addTokenValue(Grammar::T_V);
            return $this;
        }

        if ($this->getToken() === Grammar::T_I && $this->hasToken(1) && $this->getToken(1) === Grammar::T_V) {
            $this
                ->setState(self::STATE_Y)
                ->addPosition(2)
                ->addTokenValue(Grammar::T_V, Grammar::T_I);
            return $this;
        }

        if ($this->getToken() === Grammar::T_I && $this->hasToken(1) && $this->getToken(1) === Grammar::T_X) {
            $this
                ->setState(self::STATE_Y)
                ->addPosition(2)
                ->addTokenValue(Grammar::T_X, Grammar::T_I);
            return $this;
        }

        $this->setState(self::STATE_A);
        return $this;
    }
1073370
public StateMachine<T> withTransition(T from, T to, T... moreTo) {
        transitions.put(from, EnumSet.of(to, moreTo));
        return this;
    }
39366
public function addTransition(callable $transitionBuilderCallable)
    {
        $transitionBuilder = new TransitionBuilder();
        call_user_func($transitionBuilderCallable, $transitionBuilder);
        $transition = $transitionBuilder->getTransition();

        $this->transitions[$transition->getInitialStateName()][$transition->getName()] = $transition;
        return $this;
    }
475465
public function commit()
    {
        if (!$this->nested || $this->depth == 1) {
            $this->db->connect()->getConnection()->commit();
        }

        $this->depth--;

        return $this;
    }
669313
function out()
    {
        if (php_sapi_name() == 'cli'){
            echo self::Format($this, false, $trace_buf = [], '  ')."\n";
        }else{
            echo '<pre>'.self::Format($this).'</pre>';
        }
        return $this;
    }
1225742
function begin() {
		$this->dbh or $this->setup();

		if ($this->savepoint == 0) {
			$this->dbh->beginTransaction();
		}
		else { // already in a transaction
			$this->dbh->exec('SAVEPOINT save'.$this->savepoint);
		}

		$this->savepoint++;
		return $this;
	}
1313829
public function performBan()
    {
        if (!$this->_getHelper()->isActive()) {
            return $this;
        }
        
        $tagsToBan = array_unique($this->_getProcessor()->getTagsToBan());
        if ($tagsToBan) {
            try {
                $tagsToBan = array_map(
                    array(Mage::helper('ecomdev_varnish'), 'formatObjectTag'),
                    $tagsToBan
                );
                
                $queue = Mage::app()->getCache()->load(self::VARNISH_CACHE_QUEUE, true);
                
                if ($queue) {
                    $queue = unserialize($queue);
                    foreach ($tagsToBan as $tag) {
                        $queue[] = $tag;
                    }
                } else {
                    $queue = $tagsToBan;
                }
                
                $queue = serialize($queue);
                
                Mage::app()->getCache()->save($queue, self::VARNISH_CACHE_QUEUE);
            } catch (Exception $e) {
                Mage::logException($e);
            }
        }
        
        return $this;
    }
51550
public function moveInstance()
    {
        $response = array();
        if($this->hasRequestParameter('destinationClassUri') && $this->hasRequestParameter('uri')){

            $id = $this->getRequestParameter('uri');

            $this->validateInstanceRoot($id);

            $this->signatureValidator->checkSignature($this->getRequestParameter('signature'), $id);

            $instance = $this->getResource($id);
            $types = $instance->getTypes();
            $clazz = reset($types);
            $destinationUri = tao_helpers_Uri::decode($this->getRequestParameter('destinationClassUri'));

            if(!empty($destinationUri) && $destinationUri != $clazz->getUri()){
                $destinationClass = $this->getClass($destinationUri);

                $confirmed = $this->getRequestParameter('confirmed');
                if(empty($confirmed) || $confirmed == 'false' || $confirmed ===  false){

                    $diff = $this->getClassService()->getPropertyDiff($clazz, $destinationClass);
                    if(count($diff) > 0){
                        return $this->returnJson(array(
                            'status'        => 'diff',
                            'data'          => $diff
                        ));
                    }
                }

                $status = $this->getClassService()->changeClass($instance, $destinationClass);
                $response = array('status'      => $status);
            }
        }
        $this->returnJson($response);
    }
226002
public function after()
    {
        $this->importNodes(\func_get_args(), function ($node, $imported_node) {
            if ($node->nextSibling) {
                $node->parentNode->insertBefore($imported_node, $node->nextSibling);
            } else { // node is last, so there is no next sibling to insert before
                $node->parentNode->appendChild($imported_node);
            }
        });

        return $this;
    }
1218039
public function setTransitionLabel($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->transition_label !== $v) {
            $this->transition_label = $v;
            $this->modifiedColumns[SportTableMap::COL_TRANSITION_LABEL] = true;
        }

        return $this;
    }
25391
private static Transition makeTransitionToSelf(Pattern regex) {
    return new Transition(regex) {
      @Override
      Context computeNextContext(Context prior, Matcher matcher) {
        return prior;
      }
    };
  }
716349
def set_transition(self, p_self):
        '''
        '''
        if p_self is None:
            self.transition = None
        else:
            self.transition = transition_loop(len(self._classes), p_self)
123674
public function moveToTop()
    {
        if ($this->isNotInList()) return $this;

        $this->getConnection()->transaction(function() {

            $this->incrementPositionsOfItemsAbove();

            $this->setListPosition($this->listifyTop());
        });

        return $this;
    }
1370793
public function rollback()
    {
        if (!$this->nested || $this->depth == 1) {
            $this->db->connect()->getConnection()->rollBack();
        }

        $this->depth--;

        return $this;
    }
749241
public function validTransitions()
    {
        $action    = $this->CurrentAction();
        $transitions = $action->getValidTransitions();

        // Filter by execute permission
        return $transitions->filterByCallback(function ($transition) {
            return $transition->canExecute($this);
        });
    }
910633
public function start()
    {
        if (!$this->nested || !$this->depth) {
            parent::start();
        } else {
            $savepoint = 'SP_' . $this->depth;
            $this->db->setQuery('SAVEPOINT ' . $this->db->quoteName($savepoint));

            if ($this->db->execute()) {
                $this->depth++;
            }
        }

        return $this;
    }
1204264
private function doTransitionFromE() : self
    {
        if ($this->getToken() === Grammar::T_C) {
            if ($this->hasToken(1) && $this->getToken(1) === Grammar::T_C) {
                if ($this->hasToken(2) && $this->getToken(2) === Grammar::T_C) {
                    $this
                        ->setState(self::STATE_D)
                        ->addPosition(3)
                        ->addTokenValue(Grammar::T_C, null, 3);
                    return $this;
                }

                $this
                    ->setState(self::STATE_D)
                    ->addPosition(2)
                    ->addTokenValue(Grammar::T_C, null, 2);
                return $this;
            }

            $this
                ->setState(self::STATE_D)
                ->addPosition(1)
                ->addTokenValue(Grammar::T_C);
            return $this;
        }

        $this->setState(self::STATE_D);
        return $this;
    }