Saturday, August 24, 2013

Old Translator – Removal (Unused Definitions)

There are two sub-code definitions that were only used by the old translator routines.  The semicolon sub-code was used for unnecessary semicolons that were entered.  Since this is no longer permitted, this sub-code was removed.  The end sub-code was used to mark the last input parse code in an INPUT statement.  Since the new INPUT translation uses the input begin code to mark the end of the input parse codes, this sub-code is not needed and was removed.

The values of the sub-codes were modified to close the bit gaps left by the semicolon and end sub-codes.  Also several sub-codes that are only used by the translator (used, last, and unused) were given higher bit code values.  It will be convenient and desirable if the same sub-code definitions can be used by the translator and program code.  The program sub-code bit values must fit in a limited space of a 16-bit instruction word that will be shared with the code value.  It may also possible to share bit values for sub-codes that will never be used with the same code.  For example, the question and keep sub-codes will never be used on the same code (input begin string vs. input and input-prompt) so the same bit values could be used.

There was also the end-expression flag on table entries that could signal the end of an expression (close parentheses, comma, semicolon, rem-operator, and end-of-line).  This flag was needed for the token centric old translator, but not used for the new translator, so it was removed.

[commit d356621d95]

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.)