選課分析
| 期中考試 | 25 | |
| 期末考試 | 30 | |
| 作業 | 30 | 作業2-3次 |
| 課程表現 | 15 | 上課出席率、隨堂測驗、上課問答等 |
A compiler is a program that translates programs written in a source language into programs written in a target language. This course introduces the principles, techniques and tools for constructing a compiler. An emphasis is also placed on a programming project that applies the techniques and tools learned from the course to implement a compiler for a small language.
本課程旨在介紹編譯器(Compilers)的工作原理與實作方式,本課程的學習者應可達到以下的目標: 1. 瞭解編譯器產生器的技術與原理,並能實作。 2. 瞭解語彙分析方法,對於簡易的程式語言,能夠實作出相關的語彙分析器. 3. 瞭解語法分析方法,對於簡易的程式語言,能夠實作出相關的語法分析器. 4. 瞭解語意分析方法,對於簡易的程式語言,能夠構建出抽象的語法分析樹,並能實作出由下而上的翻譯產生器. 5. 瞭解中介碼的產生方式,對於簡易的程式語言,可以實作出相關的中介碼產生器. 6. 瞭解目的碼的產生方式,對於簡易的程式語言,可以實作出相關的目的碼產生器. 學習本課程能夠瞭解程式語言的編譯過程,包括 1.語彙如何形成。 2.語法如何檢查。 3.語意如何產生。 本課程的知識也可以充分運用在不同的地方,例如: 1.因瞭解編譯原理,可以加快程式語言的學習。 2.語彙檢查方式,可以運用在字串比對。
Compilers: Principles, Techniques, and Tools. 2nd edition
(ISBN-10: 0321486811 and ISBN-13: 9780321486813)
本書有中文版