Repository navigation
Home
Sinfolke edited this page Oct 25, 2026
·
7 revisions
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. 🙂
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.
| 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 |
- Getting Started installs or builds ISPA and runs a grammar.
- Your First Grammar and Grammar Syntax teach the language.
- Command Line Reference lists the CLI options.
- Generated Code and Runtime API describe what you call afterward.
- Error Recovery, Modules and External Parsers, and Algorithms and Limitations cover larger features.
- Package Manager, Debugging Generated Parsers, and Contributing and Building help with day-to-day use.
- Roadmap and Status records remaining gaps.
Questions and bug reports are welcome in Issues and Discussions.