Home
 

Implementation Strategie

Implementation Strategie

I followed Dr. Lancasters recommendation for the implementation.

First, the new tokens were added. This was done by adding their internal representation to the parser (the section called parser.y in Appendix B) and their patterns to the scanner (the section called scanner.l in Appendix B). Also, they were added to the scanner test program (the section called mainScan.C in Appendix B).

Then, the emitter (the section called emit.C in Appendix B) was modified to emit SLICK opcode for the existing language.

After that, I modified the grammar (the section called parser.y in Appendix B) to recognize the new language. The production actions were skipped for the moment.

Finally, I wrote the implementation of the production actions and the new classes. The order was: Declarations, array subscripts, expressions and statements.