private function doTransitionFromG() : self
    {
        if ($this->getToken() === Grammar::T_N) {
            $this
                ->setState(self::STATE_Y)
                ->addPosition(1);
            return $this;
        }

        if ($this->getToken() === Grammar::T_M) {
            $this
                ->setState(self::STATE_G)
                ->addPosition(1)
                ->addTokenValue(Grammar::T_M);
            return $this;
        }

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