Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
corrected processing of error conditions in expression
needed to catch command and operator tokens when an operand was expected and return correct expected expression error when checking token after operand, needed to specifically check for an operator token type; was using isOperator(), which also returns true for command tokens when clearing hold stack of higher precedence operators, needed to allow for tokens that don't have a table entry, both for precedence and is a unary operator; replaced with precedence() that checks token instead of the token code directly, and implemented new isUnaryOperator() that takes a token instead of a token code added more error tests for expression test #1 (note some of these tests cause the older less robust translator expression mode to fail)
- Loading branch information
1 parent
fab9d67
commit fc73988
Showing
6 changed files
with
59 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters