國立清華大學資訊工程學系
CS 3404 --- 編譯器設計
Homework # 1
Due: 10:00 am, March 22, 1999

In this project, you are going to implement the simple compiler introduced in Chapter 2 of the text book to handle the MICRO programming language. Your compiler should handle an enhanced Micro programming language as outlined below:

Corresponding to the new language features, your output assembly language will have the following new instructions:

 

What to turn in?

You should turn in a simple compiler for the extended MICRO language using only the techniques described in Chapter 2 of the text book. You should include in the comment of your program a grammar describing your compiler, which is augmented with action symbols. You should add comments wherever possible so that TAs can understand your program.

 

How to turn in the program?

Use ftp to send your program as follows:

ftp vcl.cs.nthu.edu.tw 100

user: compiler

password: compiler

簽入後, 可在該目錄下看到每位同學的各別目錄, 日後每次出新的作業後, 就會為每位同學建立該作業的目錄, 而此作業的所有檔案請放置進來。以學號 874315 的同學為例, 作業一的所有檔案就放在 mr874315\hw1\ 目錄下, 依此類推。

Note:

Duplicated programs will receive a zero grade in the homework. Therefore, don't duplicate programs (even part of it) and protect your program so that no one can copy it.