'; $parser = new Parser(); $parser->yydebug = false; // Output Demo $stmts = $parser->yyparse(new Lexer( 'y[z]; $x->y[z][k]->l()->m[t]; $x->y[z](); $x->$y[z](); $x->$$y[z]();' ), function ($msg) { echo $msg; } ); if (false !== $stmts) { foreach ($stmts as $stmt) { echo htmlspecialchars($stmt), "\n"; } } echo "\n\n"; $prettyPrinter = new PrettyPrinter_Zend; echo htmlspecialchars($prettyPrinter->pStmts( $parser->yyparse( new Lexer(file_get_contents('./grammar/rebuildParser.php')), function ($msg) { echo $msg; } ) ));