First page Back Continue Last page Overview Graphics
Take-Home Points
Key benefits of PEGs:
Simplicity, formalism, analyzability of CFGs
Closer match to syntax practices
- More expressive than deterministic CFGs (LL/LR)
- More of the “right kind” of expressiveness:
prioritized choice, greedy rules, syntactic predicates
- Unlimited lookahead, backtracking
Linear-time parsing for any PEG