Modify the Language Syntactically
Next: Design an Error
Up: Assignment 2: Syntax
Previous: Learn about the
Modify the syntax used by your cadaver by (1) adding a new operator
and a new data type and (2) changing the procedure/function
interface so that all procedures/functions must have at least two
arguments.
-
The purpose of the assignment is to get experience with syntax.
Modify the syntax in place (i.e. modify the compiler) if that is
feasible. However, if that is difficult for compilation or other
engineering reasons, just extract the scanner and parser and modify
them.
-
Choose your own addition, since it's impossible to give one proposal
for all the languages. You might wish to float your idea to the
newsgroup. The goal is to make a nontrivial syntactic extension,
whether or not it is good language design.
-
Discuss what was involved in making the change. How easy or
difficult is it to understand where the changes need to be?
To insure that the resulting analyzer is correct? To debug the
analyzer?
Reader Cs
Wed Sep 20 14:25:53 PDT 1995