The University of Texas at Austin Austin, Texas 78712 1. One fundamental decision to be made is the number of passes to be used in compilation. Pascal has been explicitly designed to allow one pass compilation, however, this generally produces rather poor code. Hence we would suggest a minimum of two passes, the first being lexical and syntactic analysis and the second semantic analysis and code generation.
Additional passes can improve the code optimization.
Another primary concern is the output object code. A production compiler should obviously produce directly relocatable loader code. On the other hand, for many systems programming functions, and while the compiler is being tested and refined, assembly language output may be more suitable. The operating system interface modules should do whatever is necessary to open, create, and setup the following functional files. The listing and error files are often mapped onto the same file.