function PrintAction($fp, $indent)
    {
        if (!$fp) {
            $fp = STDOUT;
        }
        $result = 1;
        switch ($this->type)
        {
        case self::SHIFT:
            fprintf($fp, "%${indent}s shift  %d", $this->sp->name, $this->x->statenum);
            break;
        case self::REDUCE:
            fprintf($fp, "%${indent}s reduce %d", $this->sp->name, $this->x->index);
            break;
        case self::ACCEPT:
            fprintf($fp, "%${indent}s accept", $this->sp->name);
            break;
        case self::ERROR:
            fprintf($fp, "%${indent}s error", $this->sp->name);
            break;
        case self::CONFLICT:
            fprintf($fp, "%${indent}s reduce %-3d ** Parsing conflict **", $this->sp->name, $this->x->index);
            break;
        case self::SH_RESOLVED:
        case self::RD_RESOLVED:
        case self::NOT_USED:
            $result = 0;
            break;
        }
        return $result;
    }
function PrintAction($fp, $indent)
    {
        if (!$fp) {
            $fp = STDOUT;
        }
        $result = 1;
        switch ($this->type)
        {
        case self::SHIFT:
            fprintf($fp, "%${indent}s shift  %d", $this->sp->name, $this->x->statenum);
            break;
        case self::REDUCE:
            fprintf($fp, "%${indent}s reduce %d", $this->sp->name, $this->x->index);
            break;
        case self::ACCEPT:
            fprintf($fp, "%${indent}s accept", $this->sp->name);
            break;
        case self::ERROR:
            fprintf($fp, "%${indent}s error", $this->sp->name);
            break;
        case self::CONFLICT:
            fprintf($fp, "%${indent}s reduce %-3d ** Parsing conflict **", $this->sp->name, $this->x->index);
            break;
        case self::SH_RESOLVED:
        case self::RD_RESOLVED:
        case self::NOT_USED:
            $result = 0;
            break;
        }
        return $result;
    }
function PrintAction ( $ fp , $ indent ) { if ( ! $ fp ) { $ fp = STDOUT ; } $ result = 1 ; switch ( $ this -> type ) { case self :: SHIFT : fprintf ( $ fp , "%${indent}s shift  %d" , $ this -> sp -> name , $ this -> x -> statenum ) ; break ; case self :: REDUCE : fprintf ( $ fp , "%${indent}s reduce %d" , $ this -> sp -> name , $ this -> x -> index ) ; break ; case self :: ACCEPT : fprintf ( $ fp , "%${indent}s accept" , $ this -> sp -> name ) ; break ; case self :: ERROR : fprintf ( $ fp , "%${indent}s error" , $ this -> sp -> name ) ; break ; case self :: CONFLICT : fprintf ( $ fp , "%${indent}s reduce %-3d ** Parsing conflict **" , $ this -> sp -> name , $ this -> x -> index ) ; break ; case self :: SH_RESOLVED : case self :: RD_RESOLVED : case self :: NOT_USED : $ result = 0 ; break ; } return $ result ; }
Print an action to the given file descriptor.  Return FALSE if
nothing was actually printed.

@param resource $fp     File descriptor to print on
@param integer  $indent Number of indents

@see PHP_ParserGenerator_Data::ReportOutput()

@return int|false
Print an action to the given file descriptor . Return FALSE if nothing was actually printed .