throw new BuildException("Cannot read grammar file " + grammar_file);
if (options.dest_dir != null && !options.dest_dir.isDirectory())
throw new IllegalArgumentException (options.dest_dir.getPath() + " is not a directory.");
SrcReader src = getSrcReader(grammar_file);
try
{
if (existsCurrentOutput(getOutputFileName(src)))
return;
}
catch (Exception e)
{
// Error(s) in source. Try to build anyway and compiler will print erorr reports.
}
src.reset();
Log log = new Log();
compile(src, options, log);
log.report(grammar_file.getName(), src);
}