Lĩnh vực này dạy gì?
- Front-end: lexer (chuỗi → token), grammar/CFG, parser (recursive-descent & Pratt) dựng AST.
- Semantics & Interpretation: AST/visitor, symbol table & scope, type checking, tree-walking interpreter, hàm & closure — ngôn ngữ đồ chơi CHẠY ĐƯỢC.
- Back-end: IR (three-address), tối ưu, bytecode + stack VM, sinh mã điều khiển luồng, cấp phát thanh ghi & target (native/WASM).
Câu hỏi xuyên suốt: bạn gõ x = (2+3)*4 — máy chỉ hiểu 0/1; compiler là cây cầu. Mỗi bài là một trạm biến đổi nhìn thấy được: tokens → AST → IR → bytecode → chạy.
Tiền đề: DataStructures (tree, stack, hash, graph), DataFoundations (đệ quy/proof, encoding), Algorithms (automata, chia để trị), OperatingSystems (stack frame, bộ nhớ). Bổ trợ Programming.
Tier 1
Tổng quan & pipeline, lexer, grammar/CFG, recursive-descent parser, Pratt parsing — mã nguồn → AST (5 bài).
Tier 2
AST/visitor, symbol table & scope, type checking, tree-walking interpreter, hàm & closure (5 bài).
Tier 3
IR (three-address), optimization, bytecode & stack VM, control flow codegen, register allocation & targets (5 bài).