Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Stream inputStream = Console.OpenStandardInput();
            AntlrInputStream input = new AntlrInputStream(inputStream);
            CalculatorLexer lexer = new CalculatorLexer(input);
            lexer.AddErrorHandlers();
            CommonTokenStream tokens = new CommonTokenStream(lexer);
            CalculatorParser parser = new CalculatorParser(tokens);
            parser.addSubExpr();

            Console.ReadLine();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Stream           inputStream = Console.OpenStandardInput();
            AntlrInputStream input       = new AntlrInputStream(inputStream);
            CalculatorLexer  lexer       = new CalculatorLexer(input);

            lexer.AddErrorHandlers();
            CommonTokenStream tokens = new CommonTokenStream(lexer);
            CalculatorParser  parser = new CalculatorParser(tokens);

            parser.addSubExpr();

            Console.ReadLine();
        }