Syllabus

Modules

Project

Office Hours

Test #1 Solutions

Grading

Class Members

Properties of Good Outputs

Outputs should be easy to come by. Output routines should be easy to add for the resulting compiler output. For the tool output, intermediate outputs describing the information in the tables or program stubs is helpful.

One necessary output is good error messages. The compiler designer should receive useful feedback when using the tool incorrectly.

Much research is currently being devoted to producing good error messages with compilers created by compiler tools. Realize that compile-time errors must be entered into erroneous positions in the generated table or program stub.

One technique which has met with modest success is the use of "error productions" in the input grammar for the language. That is, a regular expression or BNF grammar production is input which, in the generated compiler, "recognizes" an incorrect construct. The accompanying semantic action produces the error message.