As it so happens, translator test #5 was not the last of the LET tests. There is also test #7 (Error Tests), #8 (More Errors), #9 (Semicolon Errors), #10 (Expression Errors), #11 (Temporary Strings), #13 (Negative Constants), and #14 (Parser Errors, but also contains PRINT and INPUT statements). Unfortunately, all of these tests fail, three with glibc double free or corruption errors and one with a segmentation fault.
The first problem in test #7 was caused when handling the expression inside parentheses. When an error occurred, the get expression routine just continued on to the next token. The rest of the parentheses processing was skipped (popping the open parentheses token off of the hold stack, replacing the first and last operands of the done item on top of the done stack, setting the last precedence, and saving the pending parentheses token). This problem was corrected by returning when get expression returns an error for the sub-expression.
[commit 9d87ab2c03]
Wednesday, July 24, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)