Parsing with Prolog DCGs: From Text to Structure Without the Boilerplate
Prolog's Definite Clause Grammars let you write parsers as declarative rules that compile to difference-list code and run bidirectionally. A worked example plus the left-recursion trap, tabling, and library support.