Welcome to DHParser’s documentation!

DHParser is a parser-generator and and domain-specific-language construction kit, designed for but not restricted to Digital-Humanities-applications.

DHParser offers:

  • Rapid-Prototyping of EBNF-based grammar-specifications with support for different flavors of EBNF

  • Macros to reduce code-repetition within grammars and includes to avoid code-repetition between grammars.

  • Parsing-Expression-Grammar (PEG)-parser with memoization and full left-recursion 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)

  • full unicode support

DHParser is by now mature and “production ready”. It is being used in several projects, most notably for the domain specific notation of the Medieval Latin Dictionary and the Typescript-to-Python-interface-transpiler ts2python

License

DHParser is open source software under the Apache 2.0 License.

Copyright 2016-2023 Eckhart Arnold, Bavarian Academy of Sciences and Humanities

The source code can downloaded from: gitlab.lrz.de/badw-it/DHParser

Install DHParser

$ python -m pip install --user DHParser

Documentation

Indices and tables