Indexes of table entries are used in the program code to represent a table entry of a code. When the program code is read, then these indexes should be converted back to a table entry point, which is then used to access information about the code. These code indexes should only be used in the program code. However, the code indexes have been used throughout mainly within tokens.
As of the last change, they are no longer used within tokens. The only remaining uses are a few code enumerators to get a table entry and some uses within the tester class. The few code enumerators still used but will become code type enumerators when these code enumerators are combined with the type enumerators.
The tester class was using code indexes to determine if define functions contain parentheses or not. When define functions are implemented, their dictionary entries will contain the number of arguments. No arguments will mean that there are no parentheses. Since this is not yet implemented, the code indexes were used temporarily to determine if parentheses were present. The tester class should not be using code indexes.
A new Define Function No Arguments type was added for the three defined function codes without parentheses. The tester routines were modified to use this new type instead of checking for code indexes. There will be an equivalent temporary code type enumerator for this same purpose once the type enumeration and code index enumeration is removed. A case for this new type was added to the translator get operand function at the current Define Function case. With a new type, the expected results for parser test #2 (identifiers) needed to be updated.
[branch table commit c9c4ddeb44]
Saturday, January 17, 2015
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.)