all repos — notes @ a69c977fa45f0e444e3231b449d2eeb52c902388

My notes, written in md and LaTeX

compilers-aho/04-syntax-analysis.md

---
geometry:
- lmargin=0.9in
- rmargin=0.3in
- tmargin=0.3in
- bmargin=0.5in
- twoside
papersize: A4
...

\begin{huge}
\textbf{Chapter 4 - Syntax Analysis}
\end{huge}

```
Intro
..Role of the Parser
..Representative Grammars
..Syntax Error Handling
..Error-Recovery Strategies
....Panic-Mode Recovery
....Phrase-Level Recovery
....Error Productions
....Global Correction
Context-Free Grammars
..The Formal Definition of a Context-Free Grammar
..Notational Conventions
..Derivations
..Parse Trees and Derivations
..Ambiguity
..Verifying the Language Generated by a Grammar
..Context-Free Grammars Versus Regular Expressions
Writing a Grammar
..Lexical Versus Syntactic Analysis
..Eliminating Ambiguity
..Elimination of Left Recursion
..Left Factoring
..Non-Context-Free Language Constructs
Top-Down Parsing
..Recursive-Descent Parsing
..FIRST and FOLLOW
..LL(1) Grammars
..Nonrecursive Predictive Parsing
..Error Recovery in Predictive Parsing
....Panic Mode
....Phrase-level Recovery
Bottom-Up Parsing
..Reductions
..Handle Pruning
..Shift-Reduce Parsing
..Conflicts During Shift-Reduce Parsing
Introduction to LR Parsing: Simple LR
..Why LR Parsers
..Items and the LR(0) Automaton
..The LR-Parsing Algorithm
....Structure of the LR Parsing Table
....LR-Parser Configurations
....Behavior of the LR Parser
....Constructing SLR-Parsing Tables
....Viable Prefixes
```