Files
calc_engine/main.py
T

9 lines
258 B
Python
Executable File

import token
import tokenizer
#userInput = input('Enter your formula: ')
tokens = tokenizer.get_tokens_from_expression_string("1 + 2 / 3 (3 * 4) 5")
for t in tokens:
print("%s (%s) " %(t.value, token.TokenType.get_operator_name(t.type)), end = "")
print()