diff --git a/src/arithmetic.py b/src/arithmetic.py index 037d67a..389524b 100644 --- a/src/arithmetic.py +++ b/src/arithmetic.py @@ -21,7 +21,7 @@ def t_NUMBER(t): def t_EXP(t): r'\*\*' - pass + return t lexer = ply.lex.lex() @@ -76,5 +76,3 @@ parser = ply.yacc.yacc() while True: s = input('calc> ') ply.yacc.parse(s) - if s == '': - break