編譯器

112學年第2學期 必選課 3 學分
授課大綱
150
名額
148
已選
2
餘額
上課時間
一/2,3,4[波錠廳]
授課教師
Office Hour:週三 下午 2:10~4:00 週五 下午 2:10~4:00
修課班級
資工系3 · 4年級以上
課程資訊
3A、3B、3C併班
選課分析

作業 20
小考 10
專題 20
期中考 25
期末考 25

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.

At the end of this course, students should be able to: 1. Understand the principles and techniques of automatic program generators. 2. Understand lexical analysis and implement a scanner for a simple language using a scanner generator. 3. Understand syntax analysis and implement a parser for a simple language using a parser generator. 4. Understand semantic analysis and implement an abstract syntax tree constructor for a simple language using a bottom-up translator generator. 5. Understand intermediate code generation and implement a pretty printer for a simple language using a recursive evaluator. 6. Understand code generation and implement a code generator for a simple language using a recursive evaluator. Programming language representation: concrete and abstract syntax, context free grammars. Use of lexer and parser generators. Implementation of expressions and statements in a simple language by postfix code and by simple machine code; simple optimizations. Procedures: value, name and reference parameters, local and non-local variables, static and dynamic binding. Abstract machines and storage management: activation records, static and dynamic chains, stacks and heaps.

書名 Compilers: Principles, Techniques, and Tools
出版社 Addison-Wesley
作者 A. V. Aho, R. Sethi, and J. D. Ullman
出版年 2007

查詢過去本課程開課紀錄: 編譯器 歷史開課紀錄