import java.io.*;
import java.util.*;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.tree.*;

public class Main {
    public static void main(String args[]) {
        Scanner input = new Scanner(System.in);
        boolean done = false;
        
        while (!done) {
            String line = input.nextLine();
            if (line.equals("")) {
                done = true;
            } else {
                // lex this string, and pass it to the parser
                CalculatorLexer lexer = new CalculatorLexer(CharStreams.fromString(line));
                CommonTokenStream tokens = new CommonTokenStream(lexer);
                CalculatorParser parser = new CalculatorParser(tokens);

                // do the parsing
                ParseTree tree = parser.line();
            }
        }
    }
}