- Category
- Developer Tools
- Rank
- No. 3674Tools index
Previous survey · No. 3521 ·
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Coding
- GitHub
- 24 stars
- Latest release
- v0.5.1
- Date
About
Yantra is an LALR(1) parser generator for C++ that produces a lexer, parser, and AST walker from one grammar. It builds the whole AST first and then walks it top-down, so a parent rule's action can run before its children are visited. A grammar can define multiple walkers, for example one emitting C++ and another emitting Java from the same parse.
At a glance
Yantra generates C++ parsers from grammars and includes a lexer and syntax-tree builder. It is worth trying when you need to parse a small language or stream and want the lexer and parser generated together.
Good fit
C++ developers who can describe their input with an LALR grammar.
Consider something else when
Use a simpler parser for a fixed record format or pass if you cannot use a compatible C++ toolchain.
Start here
Generate a parser for a small grammar with a Unicode identifier and a nested comment. Feed it incomplete input and check what error or partial result it reports.
Cost and requirements
The MIT-licensed generator uses C++23 and CMake. It can emit one source file or separate source and header files.
Limits to know
Your grammar still needs to fit the parsing model. Check error recovery and streaming behavior with malformed input before adopting it.
Sources checked 2026-11-05. Source-based assessment.
Tags
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.