# Token types
#
# EOF (end-of-file) token is used to indicate that
# there is no more input left for lexical analysis

from interpreter import Interpreter



def main():
    while True:
        try:
            try:
                text = raw_input('calc> ')
            except NameError:  # Python3
                text = input('calc> ')
        except EOFError:
            break
        if not text:
            continue
        interpreter = Interpreter(text)
        result = interpreter.expr()
        print(result)


if __name__ == '__main__':
    main()