public function parse($rule)
    {
        if ($this->parser === null) {
            $this->parser = Compiler\Llk::load(
                new File\Read(__DIR__.'/../Grammar.pp')
            );
        }

        $this->nextParameterIndex = 0;

        return $this->visit($this->parser->parse($rule));
    }
public function parse($rule)
    {
        if ($this->parser === null) {
            $this->parser = Compiler\Llk::load(
                new File\Read(__DIR__.'/../Grammar.pp')
            );
        }

        $this->nextParameterIndex = 0;

        return $this->visit($this->parser->parse($rule));
    }
public function parse ( $ rule ) { if ( $ this -> parser === null ) { $ this -> parser = Compiler \ Llk :: load ( new File \ Read ( __DIR__ . '/../Grammar.pp' ) ) ; } $ this -> nextParameterIndex = 0 ; return $ this -> visit ( $ this -> parser -> parse ( $ rule ) ) ; }
Parses the rule into an equivalent AST.

@param string $rule The rule represented as a string.

@return \RulerZ\Model\Rule
Parses the rule into an equivalent AST .