Theory

A tutorial on the compiler-construction theory behind Alpaca: what a lexer and parser actually are, how regular expressions become finite automata, how context-free grammars drive LR parsing, and where conflicts, ambiguity, and error recovery come from.

You don't need any of this to use the library — the reference pages and the Cookbook are enough to build a language. Read this section when you want to understand why a grammar has a conflict, what the generated parse table means, or how the pieces fit together formally.

Start with The Compilation Pipeline for the mental model everything else builds on, then follow the chapters in order:

In this article