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

Program does not recognize empty expressions in brackets #1

Open
bryjen opened this issue Apr 11, 2021 · 0 comments
Open

Program does not recognize empty expressions in brackets #1

bryjen opened this issue Apr 11, 2021 · 0 comments
Assignees
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@bryjen
Copy link
Owner

bryjen commented Apr 11, 2021

Program does not recognize empty expressions in brackets

 - ()                //returns valid
 - () + 5            //returns valid
 - (-4 + ()) + 5     //returns valid

Make it so that the program can recognize empty brackets. Also make it so that the expressions in parentheses can be evaluated as expressions also (maybe recursively)

 - (-4 +4-) + 5    //returns valid

The expression is seen as valid since the program only checks that the end of the expression ends in a non-operator, not in the expressions in parentheses (since it cannot distinguish which parenthesis ends if it is nested)

@bryjen bryjen added bug Something isn't working invalid This doesn't seem right labels Apr 11, 2021
@bryjen bryjen self-assigned this Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant