Compiler (編譯器)

  1. Course Name: Compiler
  2. Time: Thursday, 08:10-11:00
  3. Credit: 3
  4. Classroom: TC-208
  5. Instructor: Dr. Quincy Wu
  6. Students: 48
  7. LINE Group for discussion: NCNU.Course.Compiler
  8. Textbook: Keith Cooper and Linda Torczon, "Engineering A Compiler", Second Edition, 2011. ISBN:978-0-12-088478-0
  9. Reference books:
    1. Leland L. Beck, " System Software: An Introduction to Systems Programming", 3rd Edition. ISBN:0-321-21177-4
    2. Basics of Compiler Design
  10. Evaluation:
  11. Outline:
    1. String Parsing
      1. Create Mail Filters
      2. Writing C Programs on a FreeBSD server
      3. How to submit your homework?
      4. [EX01] Teaching a Computer to Know Your Command
      5. [EX02] White Spaces and Larger Values
      6. [EX03] Longer Variable Names
    2. Recognizing Words
      1. [EX04] Word Count
      2. [EX05] Validate Email Addresses
    3. Regular Expressions
      1. [YouTube] UNIX Shell Regular Expressions and the sed and grep commands
      2. Regular Expressions in Grep Command with 10 Examples
      3. Regular expressions library (cppreference.com)
      4. [EX06] Regular Expression (1)
      5. [EX07] Regular Expression (2)
      6. [EX08] Regular Expression (3)
      7. [EX09] Regular Expression (4)
    4. Finite State Automata
      1. [EX10] Finite Automata
    5. 4/2 Midterm Exam (1)
    6. Nondterministic Finite Automata
      1. [EX11] Nondeterministic Finite Automata
      2. [EX12] Nondeterministic Finite Automata with epsilon-Transition (NFA-e)
    7. Regular Expression to NFA: Thompson's Construction
    8. NFA to DFA: The Subset Construction
      1. [EX13] The Subset Construction
    9. DFA to Minimal DFA: Hopcroft's Algorithm
      1. 5種能力,打造競爭實力video
      2. [EX14] Hopcroft's Algorithm
    10. Implementing Scanners
    11. Context-Free Grammar
      1. [YouTube] Sheep Baa
      2. C++ BNF Grammar
      3. [EX15] Context-Free Grammar
    12. Top-Down Parsing
    13. Table-Driven LL(1) Parsers
      1. Removal of Left Recursion
      2. Depth-First Search (DFS) with Backtracking
      3. Left Factoring (P.107)
      4. Compute FIRST(), FOLLOW(), and FIRST+().
      5. LL(1) Table Construction
      6. [EX17] LL(1) Parser
    14. Bottom-Up Parsing
    15. Building LR(1) Tables
    16. 6/18 Final Exam
  12. 教育目標
  13. 核心能力

Exercises

  1. Identify symmetric strings
  2. Verify ID Numbers
  3. Verify C++ Variable Names
  4. Verify IPv4 addresses
  5. Verify IPv6 addresses
  6. Verify Email addresses
  7. Verify URLs
  8. Matrix operation
  9. Inner Product A.B
  10. See MATLAB
  11. The m4 Macro Package, Linux Journal, April 2002.
  12. Macro Magic: m4, Part One, Linux Magazine, February 2005.
  13. Exploiting the m4 Macro Language, Department of Computing Science and Mathematics University of Stirling.

Other Resources: