校際選修

115-1 選課時程

進行中

  • 初選第一階段 6/15/2026
  • 初選第二階段 6/22/2026
  • 校際選修 8/24/2026
  • 初選第三階段 8/31/2026
  • 開學後加退選 9/7/2026
  • 逾期加退選 9/21/2026
選課資源

編譯器設計

Complier Design

學期
111-2
學分
3 學分
當期課號
535525
永久課號
CSIC30098
開課單位
資訊科學與工程研究所
授課教師
游逸平
校區
光復
類別
選修
上課時間表
週四
3
10:10–11:00
編譯器設計
EDB27
3 節連堂
4
11:10–12:00
N
12:20–13:10

* 根據陽明交大上課時間表所列

概述

This course is intended to explore the principal ideas and techniques of compiler construction. Topics include lexical analysis, syntax analysis including LL and LR parsers, type checking, run-time environments, symbol tables, code generation, and compiler-construction tools. Some compiler optimization techniques will also be covered. This course aims to give you a solid foundation in the theory of compiler construction as well as the experience of building a compiler. Much of what you have learned about algorithms and data structures will come to bear as you study and implement the various components of a compiler. In a sense, compiler construction is a showcase for many other disciplines of computer science. Course Objectives: (1) To learn structure of compilers. (2) To learn techniques used in compiler construction such as lexical analysis, top-down and bottom-up parsing, context-sensitive analysis, intermediate code generation, and code optimization. (3) To learn basic data structures used in compiler construction such as abstract syntax trees, symbol tables, three-address code, and stack machines. (4) To learn software tools used in compiler construction such as lexical analyzer generators (Lex), and parser generators (Yacc). (5) To construct a compiler for a small language using the above techniques and tools.

先修科目

Programming Languages, Data Structures, and Assembly Language and System Programming

教學方式

Course website and TAs will be announced in the first week of the semester.

評分方式

1學期作業 The course involves a significant programming project - implementing a compiler for a simple programming language. The project will build the compiler as a series of phases and you must keep pace with the project in order to be successful in this course. The project draws heavily on much of what you have learned thus far and will stretch your programming skills. You are free to choose the language you will use for the programming project. You will be assigned to generate code for the Java virtual machine. The penalty for late homework is 15% per day (weekends count as 1 day). Late homework will not be accepted after the solutions have been posted. There will be NO CREDIT given for plagiarism. 2.考試狀況 Midterm and final exams 3.評量方法 Midterm Exam 30% Final Exam 30% Course Projects 40%

課程大綱
  • Introduction
  • Lexical analysis, scanning
  • Syntax analysis, parsing
  • Context-Sensitive Analysis
  • Runtime environments
  • Code generation
  • Code optimization
週次計畫
週次主題
第 1 週Introduction
第 2 週Regular and Context-Free LanguagesLexical Analysis
第 3 週Lexical AnalysisLex - The Lexical-Analyzer Generator
第 4 週Top-Down ParsingBottom-Up Parsing
第 5 週Bottom-Up Parsing
第 6 週LR parsing I
第 7 週LR parsing II
第 8 週Yacc - The Parser GeneratorSyntax-Directed Translation
第 9 週Midterm Exam
第 10 週Syntax-Directed Translation
第 11 週Syntax-Directed TranslationIntermediate-Code Generation
第 12 週Intermediate-Code Generation
第 13 週Intermediate-Code GenerationRun-Time Environment
第 14 週Run-Time Environment
第 15 週Code Generation
第 16 週Code Optimization
第 17 週Code Optimization
第 18 週Final Exam
教科書

Required textbook: Compilers: Principles, Techniques, and Tools (2nd edition), by Aho, Lam, Sethi, and Ullman, Addison Wesley, 2007. Reference book: Lex & Yacc, by Doug Brown, John Levine, and Tony Mason, O'Reilly Media, 1995.

Office Hours
地點
EC532
聯絡方式
分機56688 ypyou@cs.nctu.edu.tw