Exemplo n.º 1
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);
         TLexer lex = new TLexer(input);
         ITokenStream tokens = new TokenRewriteStream(lex);
         TParser parser = new TParser(tokens);
         parser.program();
         Console.Out.WriteLine(tokens);
     }
     else
         Console.Error.WriteLine("Usage: tweak <input-file>");
 }
Exemplo n.º 2
0
Arquivo: Main.cs Projeto: dfneto/comdd
        public static void Main(string[] args)
        {
            if (args.Length == 1)
            {
                string inputFileName = args[0];
                if (!Path.IsPathRooted(inputFileName))
                {
                    inputFileName = Path.Combine(Environment.CurrentDirectory, inputFileName);
                }

                ICharStream input = new ANTLRFileStream(inputFileName);
                TLexer lex = new TLexer(input);
                CommonTokenStream tokens = new CommonTokenStream(lex);
                //System.out.println("tokens="+tokens);
                TParser parser = new TParser(tokens);
                parser.program();
            }
            else
                Console.Error.WriteLine("Usage: dynscope <input-file>");
        }
Exemplo n.º 3
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);
         TLexer       lex    = new TLexer(input);
         ITokenStream tokens = new TokenRewriteStream(lex);
         TParser      parser = new TParser(tokens);
         parser.program();
         Console.Out.WriteLine(tokens);
     }
     else
     {
         Console.Error.WriteLine("Usage: tweak <input-file>");
     }
 }
Exemplo n.º 4
0
        public static void Main(string[] args)
        {
            if (args.Length == 1)
            {
                string inputFileName = args[0];
                if (!Path.IsPathRooted(inputFileName))
                {
                    inputFileName = Path.Combine(Environment.CurrentDirectory, inputFileName);
                }

                ICharStream       input  = new ANTLRFileStream(inputFileName);
                TLexer            lex    = new TLexer(input);
                CommonTokenStream tokens = new CommonTokenStream(lex);
                //System.out.println("tokens="+tokens);
                TParser parser = new TParser(tokens);
                parser.program();
            }
            else
            {
                Console.Error.WriteLine("Usage: dynscope <input-file>");
            }
        }