Giraffe is a scanner and parser generator, it can generate human-readable recursive-descent parsers for strong-LL(1) grammars. Giraffe currently generates C# code but is designed to support arbitrary target languages.
Giraffe's frontend is generated by Giraffe! See grammar.txt for an example of a practical grammar definition. Additional examples are in the Examples directory.
- Simple syntax for grammar definitions
- Ignored terminals, discarded symbols, and inline-expanded non-terminals
- Output in the form of a human-readable recursive-descent parser
- Small, convenient runtime including Visitor interface
- Basic grammar hygenie checks (e.g. non-productive rules)
- Support for sets of start symbols (and, therefore, the empty language)
- Automatic passes to convert grammars to strong-LL(1) (when possible)
- Support for extended-CF operators in rule definitions
- Semantic actions
- Configurable display names for symbols
- Improved error reporting in the Giraffe CLI
- Custom exceptions in generated code