Recognizers

02-11-2026

Introductions

Recognizers are the building blocks of Scanners and therefore Compilers. Technically speaking, they are abstract machines that have one job: to answer the question "Is this word in the language?". A key trait that recognizers posses is that they guaranteed to either respond yes or no. These binary decisions underpin all functionality in the rest of the compiler workflow.

How it works

Formally, a recognizer defines a language L⊆Σ∗L \subseteq \Sigma^* by accepting exactly the strings in LL. From an Compiler implementation perspective, recognizers are modeled as finite automata, allowing deterministic and (relatively) fast processing through input.