Minipas : a comprehensive error-checking compiler for Pascal

The system described in this report is a comprehensive error-checking compiler for a subset of Pascal called Minipas. It is designed for students with limited experience in debugging erroneous Pascal programs. The Minipas compiler only handles the early two stages of the compilation process, that is, lexical analysis and syntax analysis; no object code is generated. It is coded in Pascal 6000[4] and implemented on a CDC Cyber 170 with NOS operating system. Chapter 1 of this report explains the motivation and goals for the project. Chapter 2 defines the language Minipas; a complete syntax description in terms of BNF (Backus-Naur Form) and syntax diagrams is given in an appendix. The syntax diagrams closely reflect. the structure of the compiler. Chapter 3 describes the internal organization of the compiler. It starts with an explanation of the error types (lexical, syntactic, and semantic errors) and their corresponding recovery strategies. Various compiler tables (symbol tables) and their data structures are also discussed in detail. These tables are valuable tools in detecting semantic errors. Chapter 4 examines machine-dependency problems, that is, compiler portability. (See more in text.)