protected static function parse(&$source) { global $yydebug; if (!self::$tokenizer) { self::$tokenizer = new phpParserTokenizer(); } self::$tokenizer->setSource($source); self::$tokenizer->debug = $yydebug; return yyparse(); }
protected function &migrate(&$source, $format) { switch ($format) { case 'nodes': return phpParser::toNodes($source); case 'string': return phpParser::toString($source); case 'terminals': return phpParser::toTerminals($source); case 'tokens': return phpParser::toTokens($source); case 'tree': return phpParser::toTree($source); default: return false; } }