Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to check syntax of input equation #152

Closed
wants to merge 7 commits into from

Conversation

vidhanarya
Copy link
Contributor

@vidhanarya vidhanarya commented Mar 11, 2019

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

vidhanarya and others added 7 commits March 11, 2019 18:40
Changed pyqt5 version from 5.11.2 to 5.11.3
Travis CI failed because the hash was not updated forPyQt5.11.2.
Extending more functionality to the matrix module (aerospaceresearch#154)
* Adds Diagonal Matrix Class
* Identity Matrix Class now inherits from the Diagonal Matrix class
* Update gitignore and minor doc fixes
* Added an attribute traceMat() to the SquareMat class, added a test for trace (aerospaceresearch#146)
@vidhanarya vidhanarya changed the base branch from dev to master March 12, 2019 23:27
@vidhanarya vidhanarya changed the base branch from master to dev March 12, 2019 23:27
@vidhanarya
Copy link
Contributor Author

Closing this PR and opening a clean PR with 1 commit (Addition of checkSyntax function and test cases)

@vidhanarya vidhanarya closed this Mar 12, 2019
@vidhanarya vidhanarya deleted the dev-vidhan branch March 12, 2019 23:41
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.

4 participants