Пример #1
0
 public static void Main(string[] args)
 {
     try
     {
         java.io.Writer output = new TextWriterAdapter(Console.Out);
         Parser parser = new Parser(new PrettyFormatter(output, true));
         Lexer lexer = new I18nLexer(parser);
         string source = File.OpenText(args[0]).ReadToEnd();
         lexer.scan(source);
     } catch(Exception e) {
         Console.Error.WriteLine(e.Message);
         System.Environment.Exit(1);
     }
 }
Пример #2
0
 public static void Main(string[] args)
 {
     try
     {
         java.io.Writer output = new TextWriterAdapter(Console.Out);
         Parser         parser = new Parser(new PrettyFormatter(output, false));
         Lexer          lexer  = new I18nLexer(parser);
         string         source = File.OpenText(args[0]).ReadToEnd();
         lexer.scan(source, args[0], 0);
     } catch (Exception e) {
         Console.Error.WriteLine(e.Message);
         System.Environment.Exit(1);
     }
 }