PurpleDragonBook
Exercise 3.4.5
Exercise 3.4.3, 3.4.4
3.4.5 Exercises for Section 3.4 Exercise 3.4.1, 3.4.2
3.4.2 Recognition of Reserved Words and Identifiers 3.4.3 Completion of the Running Example 3.4.4 Architecture of a Transition-Diagram-Based Lexical Analyzer
Exercise 3.3.7-11 正規表現の練習問題の山にウンザリ.. 3.4 Recognizing Tokens 3.4.1 Transition Diagrams
3.3.6 Exercises for Section 3.3 Exercise 3.3.5, 3.3.6
2.8.4 Three-Address Code Translation of Expressions Better Code for Expressions
2.8.4 Three-Address Code Translation of Statements
2.8.3 Static Checking L-values and R-values Type Checking 2.8.4 Three-Address Code Three-Address Instructions
2.8.2 Construction of Syntax Trees Representing Blocks in Syntax Trees Syntax Trees for Expressions
2.8 Intermediate Code Generation 2.8.1 Two Kinds of Intermediate Representations 2.8.2 Construction of Syntax Trees Syntax Trees for Statements
2.6.6 Exercises for Section 2.6 2.7 Symbol Tables 2.7.1 Symbol Table Per Scope 2.7.2 The Use of Symbol Tables
2.6.5 A Lexical Analyzer
2.6 Lexical Analysis 2.6.1 Removal of White Space and Comments 2.6.2 Reading Ahead 2.6.3 Constatns 2.6.4 Recognizing Keywords and Identifiers
2.5.5 The Complete Program
2.4.6 Exercises for Section 2.4 Exercise 2.4.1 2.5 A Translator for Simple Expressions 2.5.1 Abstract and Concrete Syntax 2.5.2 Adapting the Translation Scheme 2.5.3 Procedures for the Nonterminals 2.5.4 Simplifying Translator
2.4.1 Top-Down Parsing 2.4.2 Predictive Parsing 2.4.3 When to Use ε-Productions 2.4.4 Designing a Predictive Parser 2.4.5 Left Recursion
2.3.6 Exercises for Section 2.3 Exercise 2.3.1-5 2.4 Parsing
2.3.3 Simple Syntax-Directed Definitions 2.3.4 Tree Traversals 2.3.5 Translation Schemes
2.3 Syntax-Directed Translation 2.3.1 後置記法 2.3.2 Synthesized Attributes
Exercise 2.2.5 a: ヒント: 構文木のノード数に関する帰納法を使う. こんな感じ↓で単純にプロダクションで場合分けすれば良い気がする. Base Case: num -> 11 (2^1+2^0) および num -> 1001 (2^3+2^0) 2^{k+1}+2^{k} および 2^{k+3}+2^{k} が3の倍数とする(I…
Exercise 2.2.2, 2.2.3, 2.2.4
演算子の優先順位, Exercise 2.2.1
Ambiguity, Associativity 代入演算子は右結合
Parse Trees 左から右に決めうち