LogLevel:SL,SC-EL,EC: message
159160161162163164165166167168169170171172173
{ Options opts = parseOptions(args); File src_file = getSrcFile(args[args.length - 1]); SrcReader src_reader = new SrcReader(src_file); Log log = new Log(); compile(src_reader, opts, log); boolean logHasErrors = log.hasErrors(); log.report(src_file.getName(), src_reader); System.exit(logHasErrors ? 1 : 0); } catch (IllegalArgumentException e) { System.err.println(e.getMessage());
9899100101102103104105106
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); }
2526272829303132
public void generate() throws IOException, Parser.Exception, Grammar.Exception { for (final File file : source.getFiles()) { final SrcReader srcReader = new SrcReader(file); final Options options = new Options(); options.dest_dir = getOutputDirectory(); ParserGenerator.compile(srcReader, options, new Log()); } }