/** * Get AST of the token representation. * * @return \Hoa\Compiler\Llk\TreeNode */ public function getAST() { if (null === static::$_regexCompiler) { $stream = new File\Read('hoa://Library/Regex/Grammar.pp'); $stream->rewind(); static::$_regexCompiler = Compiler\Llk::load($stream); } if (null === $this->_ast) { $this->_ast = static::$_regexCompiler->parse($this->getRepresentation()); } return $this->_ast; }