Welcome to DHParser’s documentation!¶
DHParser is a parser-generator and and domain-specific-languages construction kit, designed for but not restricted to Digital-Humanities-applications.
DHParser offers:
EBNF-based grammar-specification language with support for different flavors of EBNF
Parsing-Expression-Grammar (PEG)-parser with memoization and full left-recursion support
full unicode support
unit-testing-framework for grammars
post-mortem debugger for generated parsers
support for fail-tolerant parsing
customizable error messages
extensive tree-processing facilities
support for building language servers (experimental)
Install DHParser¶
$ python -m pip install --user DHParser
Resources¶
- Overview of DHParser
- Writing a parser quickly
- Larger scale DSL-projects
- Clutter-free grammars
- Declarative Abstract-syntax-tree transformation
- Test-driven grammar development
- Tracing post-mortem debugger for parsers
- Fail-tolerant parsing
- Tree compilation with the Visitor-pattern
- Serialization as you like it: JSON, XML, S-expressions
- Connecting with XML-technolgies easily
- Server-mode for setting up DSL-language-servers
- Performance considerations
- Step by Step Guide
- Reference Manual