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)
Program does not recognize empty expressions in brackets
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)
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)