PART I

MILESTONES

In keeping with the problem-based approach of the text, the text of the milestones is presented first. Chapter 2 presents the specifications of the project. Milestone I asks you to learn a completely new (for most readers) language called Forth. Forth has an interesting history and is currently used to support Adobe’s Portable Document Format® (pdf) processing. Forth is the target language for the compiler you will develop. The material in Part II is provided to explain how to develop such a compiler.

Milestones II and III are the first two components for the compiler. The purpose of these two is to read the users’ programs, with two results: (1) making a determination as to whether the program is syntactically correct and (2) producing an intermediate, in-memory (deep structure) version of the program.

Milestone IV inspects the deep structure version of a program and enforces the typing rules.

Milestone V produces code for programs that are only constants. While not very interesting in the scheme of things, this is a mid-point check that the compiler is actually capable of producing code.

Milestone VI is perhaps the most difficult of the milestones in terms of implementation. The good news is that once the scope and local variable issue are worked out, the remaining milestones are much easier.

Milestone VII produces user-defined functions. Recursion by itself is not that difficult; the unprepared student, however, often has issues with recursion that must be worked out.

Milestone VIII tackles the issues of nonatomic data definitions. While strings were implemented in Milestone V, the design of strings was under control of the designer. Complex data types take that control from the compiler and place it with the programmer.

Milestone IX is actually an anticlimax: objects are a combination of Milestones VI and VIII. Be sure, however, to read Chapter 3.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.188.244