Examples

Toy calculator

A recursive-descent parser for arithmetic expressions with + - * / and parentheses. The smallest cparse grammar that still demonstrates precedence, cursor save/restore and error recording.

Toy calculator
Read walkthrough
ARITHMETICRECURSIVE-DESCENTBEGINNER
Key/value config

A line-based key = value reader with [section] blocks. Demonstrates scope tracking via enterScope/leaveScope and how unterminated sections become useful error messages instead of silent truncation.

Key/value config
Read walkthrough
CONFIGLINE-BASEDSCOPE-TRACKING
CSV-lite

A CSV reader with quoted fields and embedded commas. Shows building a token-stream iterator on top of a Cursor and reporting the exact line:col of a malformed quote.

CSV-lite
Read walkthrough
CSVQUOTINGITERATOR