main(); $reply = explode("\n", ob_get_contents()); ob_end_clean(); $errors = array(); $conflicts = 0; foreach ($reply as $i => $line) { // Errors are prefixed with the grammar file path. if (strpos($line, $argv[1]) === 0) { $errors[] = str_replace($argv[1], basename($argv[1]), $line); } if ($i === count($reply) - 2) { if (preg_match('/^(\d+).+/', $line, $m)) { $conflicts = intval($m[1]); } } } if ($errors) { exit(implode("\n", $errors)); } // Build was a success! if ( ! file_exists(ROOT.$target) || @unlink(ROOT.$target)) { $content = file_get_contents(ROOT.$source.'.php'); // Add namespace declaration. $content = strtr($content, array( ' "