Be sure to have your executable compiler ready to run on esus.
Follow your TA's directions to access a mPascal program to parse. Once you have parsed the program, open the generated file "parse-tree" with Notepad and type your group number and team names in the upper left corner of the page, along with the title "Laboratory for March 27 and 29." Finally, print this page.
You may include up to two more sheets of paper that you print, demonstrating what your program does when parsing a program in which there are identifiers that are declared more than once in the current scope.
As a group, it is time for you to settle carefully on the decision as to which level (A, B, or C) you wish to strive for with your compiler. Neither level B nor C require the translation of procedures and functions. However, your compiler should still be able to parse any mPascal program. Thus, you will need to be able to construct a symbol table with scopes. We have had you work on the multi-scope symbol table this past week so that you will all understand how it works. One thing to remember in making your choice is that the higher the level you strive for, the more practice you will get with the concepts we cover in the lecture, which will make your learning of the concepts that much easier (e.g., for exams).
Continue to work on your symbol table. Your next assignment will require that you include code that will print your symbol table on demand. You will be able to put this call into your code at any point for help in debugging as well as to demonstrate that your symbol table works. Whenever the new print_symbol_table method of the Symbol_Table object or package is called, the entire stack of symbol tables for each scope must be printed and labeled with the name of its scope (name of the procedure, function, or program of that scope). The assignment will require other things as well, posted with the projects assignment.