Skip to content

Conversation

@vidhanarya
Copy link
Contributor

Before generating tokens, tokenizer will check for the syntax of the input equation if it matches standards defined in User Manual -> Syntax Guidelines as described in issue #140 .

Example:

Before adding function-

(aeroenv) vidhanarya@macbookpro:visma$ python main.py 
>>> simplify(.2 + 4)
INPUT: 2.0 + 4.0
OPERATION: simplify
OUTPUT: 6.0

2.0 + 4.0

6.0
(Adding 4.0 and 2.0)


>>> simplify(2 + sin2)
INPUT: 2.0 + 2.0
OPERATION: simplify
OUTPUT: 2.0 + 2.0

2.0 + 2.0

When function was added-

(aeroenv) vidhanarya@macbookpro:visma$ python main.py 
>>> simplify(log2)
Invalid Expression
>>> addition(log2+log3)
Invalid Expression
>>> simplify(log(2))
INPUT: log(2.0)
OPERATION: simplify
OUTPUT: log(2.0)

log(2.0)


>>> simplify(0.2 + .4)
Invalid Expression
>>> simplify(.3 + 4)
Invalid Expression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant