Exemplo n.º 1
0
Arquivo: Main.cs Projeto: dfneto/comdd
 public static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         string inputFileName = args[0];
         if (!Path.IsPathRooted(inputFileName))
         {
             inputFileName = Path.Combine(Environment.CurrentDirectory, inputFileName);
         }
         ICharStream input = new ANTLRFileStream(inputFileName);
         SymtabTestLexer lex = new SymtabTestLexer(input);
         CommonTokenStream tokens = new CommonTokenStream(lex);
         SymtabTestParser parser = new SymtabTestParser(tokens);
         parser.prog();
     }
     else
         Console.Error.WriteLine("Usage: scopes <input-file>");
 }
Exemplo n.º 2
0
 public static void Main(string[] args)
 {
     if (args.Length > 0)
     {
         string inputFileName = args[0];
         if (!Path.IsPathRooted(inputFileName))
         {
             inputFileName = Path.Combine(Environment.CurrentDirectory, inputFileName);
         }
         ICharStream       input  = new ANTLRFileStream(inputFileName);
         SymtabTestLexer   lex    = new SymtabTestLexer(input);
         CommonTokenStream tokens = new CommonTokenStream(lex);
         SymtabTestParser  parser = new SymtabTestParser(tokens);
         parser.prog();
     }
     else
     {
         Console.Error.WriteLine("Usage: scopes <input-file>");
     }
 }