Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var lexer  = new ExpLexer(new System.IO.StreamReader("test.txt"));
            var parse  = new ExpParser(lexer);
            var result = parse.s().res.Value;

            Console.WriteLine(result);
            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("For run use: parsers <input file>");
                return;
            }
            expNode root;

            using (StreamReader fin = new StreamReader(args[0]))
            {
                var lexer  = new ExpLexer(fin);
                var parser = new ExpParser(lexer);
                root = parser.exp();
            }
            Application.EnableVisualStyles();
            Application.Run(new Form1(root));
        }
Exemplo n.º 3
0
 public ExpParser(ExpLexer lexer) : base(lexer)
 {
 }