---
tags: [CS, Compiler]
---

# Compiler

## Getting Started

- [Grammar](./grammar.md) - Basic concepts and grammar theory
- [Lexical Analysis](./lexical.md) - Tokenizers and finite automata

## Syntax Analysis

- [Top-Down Parsing](./top-down.md) - LL(1) parsing and recursive descent
- [Bottom-Up Parsing](./bottom-up.md) - LR(0), SLR, and LALR parsing
- [Abstract Syntax Tree](./ast.md) - AST construction and algorithms

## Core Analysis

- [Semantic Analysis](./semantic.md) - Type checking and symbol tables
- [Intermediate Representation](./ir.md) - IR and optimization
- [Optimization](./optimization.md) - Local, global, and inter-procedural optimizations

## Code Generation

- [Code Generation](./generation.md) - Stack and register-based code generation
- [Garbage Collection](./gc.md) - Mark and sweep, stop and copy

## Examples

- [Examples](./examples.md) - C declaration interpreter, Cool language, parser implementation
