1-28-03 Current implementation of the MT_Interpreter by Peter Laurina files changed: vm.cpp <-added one line: #include "interpreter.cpp" & interpreter sequence in main() MTconstants.h <-added definitions of "types" of elements interpreter.cpp <-contains the bulk of the interpreter get_type.cpp <-contains the get_type() function and it's needed functions Why is it not a class of it's own? The interpreter is not class. Instead it is contained within a cpp file. an #include "interpreter.cpp" command is then used in the public section of the MTmachine class. Therefore the methods/functions of the interpreter is actually part of the MTmachine class. This is the reason for implementing it in this manner instead of as a seperate class. One reason is the functions of the interpreter need direct access to private data structures of the MTmachine class. The registers, stack, and heap must be accessable from the interepreter. Otherwise a number of functions specific to the interpreter would need to be added to the MTmachine's public function list. This would have created an interpreter that I felt would be too incorporated with the code contained within vm.cpp. Removal or update of the interpreter with the implementation that has been done allows it to be removed from the MTmachine by commenting out the code line mentioned above. What does is do so far? Currently, the interpreter is not fully functional. It is missing a couple functions that will allow it to actually compute answers and print them to the screen. As of today, the interpreter uses the stack and the heap to store a list structure of the inputted command. The list structure is stored in the MTheap, and the stack is used to generate the list in the correct fashion. Only "simple" commands can be used at the moment. Meaning, functions and symbols are not yet usable. For instance, how can you tell if an element is a function or a symbol based only on seeing the element itself? If the element is a char* to "x1" would x1 be a function or a symbol? Is it already contained in the function or symbol table? if it's not, which is it? These are some of the questions that need to be answered in order to make functions and symbols work. An input of (+ 2 (*(+ 5 4) 4) will be placed in the heap correctly, but there currently is not eval function to take this information and compute it.