Skip to content
Sinfolke edited this page Oct 25, 2026 · 7 revisions

Welcome to ISPA 👋

ISPA is a parser and lexer generator written in modern C++. Give it a .isc grammar and it generates a typed AST, lexer, and parser for C++17 or Python. The generator itself uses generated parsers to read its grammar, embedded Python subset, and module declarations.

About the name: ISPA stands for Internally Standalone Parser Generator. The name stayed even as the project grew. 🙂

A small taste

module main -> demo;

NUMBER: @ [0-9]+ {@};
expr: @ NUMBER {@};

@ captures a value; {@} makes that captured value the production's result. Start with Your First Grammar for the longer walkthrough.

Where things stand

Area Status
C++17 and Python output Both implemented; Python generation uses LL
LL parser and tagged-DFA lexer Production target; actively growing, with further work and testing ongoing
LR and LALR plugins Less capable than LL for now; experimental recognition and basic AST captures
LR(*) Advertises a plugin interface but rejects builds as unsupported
Recovery LL supports automatic and grammar-directed recovery, with limits
External parsers and modules Implemented for LL; see Modules and External Parsers
Incremental generation Supported through --incremental and algorithm caches

Find your way around

Questions and bug reports are welcome in Issues and Discussions.

Clone this wiki locally