diff --git a/visma/io/tokenize.py b/visma/io/tokenize.py index d0a0ac7..2293ba3 100644 --- a/visma/io/tokenize.py +++ b/visma/io/tokenize.py @@ -68,7 +68,7 @@ def getTerms(eqn): terms = [] while x < len(eqn): - if ('a' <= eqn[x] <= 'z') or ('A' <= eqn[x] <= 'Z') or eqn[x] in greek: + if ('a' <= eqn[x] <= 'z') or ('A' <= eqn[x] <= 'Z') or eqn[x] in greek or eqn[x] in constants: buf = eqn[x] if x + 3 < len(eqn): @@ -103,6 +103,10 @@ def getTerms(eqn): terms.append("exp") x += 1 continue + elif eqn[x] ==constants[0]: + terms.append(str(math.pi)) + x += 1 + continue elif eqn[x] == 'i': terms.append("iota") x += 1