I needed a parser generator to generate parsers that blend in perfectly with my projects.
Imperator is a parser generator for LL(*) context-free grammars, with nested lookaheads, specializations for tokens (e.g. for keywords), and support for C#, C++ and Java as the target platforms. It supports regular expressions for tokens, syntactic lookahead within lookahead, and generates actually readable (and debuggable) code. The grammar definitions are easy to create and maintain, and deployment of the generated parsers is pretty much trivial. The output exploits features of modern target object-oriented languages, like nodes in the output tree being typed as inner nodes representing rule instances or leaf nodes representing matched tokens. Tokens not only have images of their matched content attached, they also contain precise and reliable line and character numbers. If anything's wrong with the input for a generated parser, proper error messages will help you and your program's users pinpoint the fault locations accurately in an instant.
- Written in C#/Microsoft.NET
- Clean and actually debuggable parser output for C#, C++ and Java
- Properly specified input language with self-defining grammar - with regular expressions for token definitions
- Includes an example grammar which serves as the reference for the grammar's grammar itself (seriously)
- Deployment of the generated parsers is trivial
- Usage of the generated parsers is made comfortable by a clear distinction between rule instances and tokens, and typing according to the grammar being represented by enums in the output nodes
- Token images, line and char numbers are all available for use, and they are always accurate
- At choice points, you can define syntactic lookaheads of arbitrary complexity and encapsulation
- The generated parsers yield proper error messages when they are fed faulty input