Parser II, Enhancing the Stubs

Posted Monday, February 17
Due at the beginning of your lab period the following week


Objectives

The objective of this week's assignment is to ensure that all of the nonterminal routines in your parser are completely fleshed out.  The only exception is that you are not expected to have all of the lookahead tokens for the case statements correctly figured out.  Many of them will come easy, but some may take a bit more effort.  You can include as many lookahead tokens as you want, but expect that some changes might need to be made.

To Do

Using the context free grammar available for mPascal on the resources page, flesh out your nonterminal stubs following the routine demonstrated in class.

Without knowing the proper tokens to insert, your nonterminal routines will not actually be able to call other nonterminal routines, so make sure your stubs to not try to execute such calls.  One way to do this is to ensure that the dummy value you insert for the lookahead always takes the "others" route, where you can print your message from last time, as in 

Expression has not yet been implemented

You will be removing these messages one at a time as you later completely implement these stubs.

Finally, you will need to insert temporarily a series of calls in your parser that calls each of the nonterminal routines, the Match routine, and the Error routine, just to see that the program works to the extent that each routine can be called.

To Turn In

Do not turn in any printed output this time.  Have your source and executable files ready to examine on esus, but keep the permissions restricted to your group until you are given directions otherwise.