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("i + 2 / i (3 * n) 5")
for t in tokens:
print("%s (%s) " %(t.value, token.TokenType.get_operator_name(t.type)), end = "")
print()