public function parse(array $tokens)
    {
        $parser = new Parser($this->symbolContainer);

        if ($this->customGrammarChecker !== null) {
            $parser->setCustomGrammarChecker($this->customGrammarChecker);
        }

        $rootNode = $parser->parse($tokens);

        return $rootNode;
    }
public function parse(array $tokens)
    {
        $parser = new Parser($this->symbolContainer);

        if ($this->customGrammarChecker !== null) {
            $parser->setCustomGrammarChecker($this->customGrammarChecker);
        }

        $rootNode = $parser->parse($tokens);

        return $rootNode;
    }
public function parse ( array $ tokens ) { $ parser = new Parser ( $ this -> symbolContainer ) ; if ( $ this -> customGrammarChecker !== null ) { $ parser -> setCustomGrammarChecker ( $ this -> customGrammarChecker ) ; } $ rootNode = $ parser -> parse ( $ tokens ) ; return $ rootNode ; }
Parses an array of tokens. Returns a single node that is a container node.

@param Token[] $tokens

@return ContainerNode
Parses an array of tokens . Returns a single node that is a container node .