There were several internal code table entries (null, assignment, print item, input assign and input parse) that were assigned to either an Operator or Internal Function token type. These internal codes do not require a token type because they are not produced by the parser (the token type is only used for tokens from the parser). These table entries were changed to the default token type (in other words, no type).
The reason for this change will become more evident when the new table class hierarchy is implemented. One of the goals of which is to reduce the amount of unnecessary initialization values. It may even turn out that the token type member of all table entries will be unnecessary, but this is not clear yet.
These changes did cause a minor issue in test output. By default the test output stream insert operator for a token outputs nothing for a token without a type, which cause the above modified codes to not produce their debug name. This function was modified to output the debug name in the default case instead of doing nothing. Since the internal function types also only output the debug name, these cases were removed to let the default case handle these types.
[branch table commit 232a97f6d6]
Sunday, December 21, 2014
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.)