There are seven parser errors that can occur, but only two major types - an unrecognizable character error and some type of error in a numerical constant. To test each of these seven errors, a new translator test (#14) was created for all the possible places during translation each of these errors can occur. If no instances were missed, this is 16 places for each of the seven errors for a total of 112 test inputs.
The translator was temporarily modified to output the string "PARSER:" in front of the parser errors so they can easily be seen. This does affect any of the current expected test results since none of the current translator tests have parser errors (an obvious oversight).
For now, the expected results for this new test contains the current output, but will be updated as these are corrected to the desired "expected such-and-such" error messages. The numeric errors are appropriate if the translator was expecting a numerical constant (in other words, an operand), so the existing parser errors will be changed to the "expected such-and-such" format with the possible exception of the "constant is out of range" error.
Note that because of the recent changes to the regression test scripts (which now automatically detect tests), no modifications were needed to add this new test.
[commit aa9271b8c9]
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.)