COMPILER · STUDY NOTES

Compiler 학습 정리 — 전체 목차

Douglas Thain, Introduction to Compilers and Language Design (2nd ed., 2023)

각 단원 카드를 클릭하면 주제별 설명 · 개념 요약 · 시험 포인트를 한눈에 볼 수 있습니다.

5

Parsing in Practice

실전 파싱 — Bison & Flex

Bison parser generator로 expression language의 validator · interpreter · translator를 만들고 AST 기초를 익힌다.

BisonLALRsemantic actionAST
학습하기 →
6

The Abstract Syntax Tree

AST 설계와 구축

decl · stmt · expr · type 의 AST 자료구조를 설계하고, Bison으로 자동 구축하는 방법을 다룬다.

decl/stmt/expr/type%unionEXPR_CALL
학습하기 →
7

Semantic Analysis

Type System과 Type Checking

symbol table, scope, name resolution, type checking으로 프로그램의 semantic을 검증한다.

symbol tablescopename resolutiontype checking
학습하기 →
8

Intermediate Representations

IR의 형태와 종류

DAG, control flow graph, SSA form, three-address code, stack machine IR 등 다양한 IR을 비교한다.

DAGCFGSSAthree-address code
학습하기 →
9

Memory Organization

Stack과 Heap 구조

logical segmentation, heap management, stack frame, calling convention 등 런타임 memory layout과 관리를 다룬다.

heapstack frameactivation recordcalling convention
학습하기 →
11

Code Generation

AST에서 Assembly로

scratch register 관리, expression · statement · declaration의 x86-64 assembly code generation을 다룬다.

register allocationscratch registerx86-64
학습하기 →