The paper describes the experience gained by teaching a project-based course in Compiler Construction. The course is a blend of theoretical concepts and practical considerations that go into the development of a compiler. A project in compiler writing is an important component of this course. ASP, a subset of standard PASCAL, is used as the source language. The compiler for ASP is to be developed in various phases: character manipulator, lexical analyzer, syntax analyzer, semantic analyzer, and code generator. Recursive descent method is used to parse the various syntactic entities. The code generator emits code for a hypothetical machine called AOC (ALGOL Object Code). A simulator executes this code.
Read full abstract