Saturday, November 9, 2013

Recreator – Operand Recreate Function

The method of using an unset (null) recreate function pointer to indicate an operand is problematic during development.  It is also possible that the recreate function for code is not yet implemented.  Further, using a blank token string to indicate an unimplemented code is also a problem since this also could mean that the code does not produce any output (take for example the hidden conversion codes).

Therefore, an operand recreate function was implemented, which simply pushes the string of the token to the string holding stack.  A pointer to this function was added to the constant and variable code table entries.  The main recreate routine was modified to surround the string of a token code with no recreate function with question marks.  A check was also needed for whether the code in the token is valid before retrieving its recreate function.

[commit 9734165b8b]

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