Dhparser

Latest version: v1.8.1

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 8

22.7.2022

..................................

- some experimental suuport in DHParser.nodetree for adding
markup and milestones into a nodetree
- documentation extended

22.2.2024

..................................

- removed unnecessary directories from pyproject.toml, e.g.
tests, documentation_src... These are not required for
running DHParser and can always be obtained from git
- comments inside insignificant whitespace can now be retained
by adding "no_comments"[sic!] to the drop-directive
- DHParser now comes with a few predefined parsing-functions
in DHParser.parsers. For now, there is parse_HTML and parse_XML
(in contrast to nodetree.parse_xml, the latter is slower, but
strictly adheres to the XML-grammar of the W3C except
DTDs inside an XML-document, which is not supported)
- ebnf-grammar now allows to specify character ranges with
(e.g.) "[\x00CD-\x0CFD]" (EXPERIMENTAL)

21.11.2022

...................................

- Bugfix: generated project-test-script "tst_..._grammar.py" crashed
when trying to read and output error messages from EBNF-compilation

20.10.2019

...................................

- rudimentary language server support (still experimental!)
- translation pipeline only stops on fatal errors. This makes previews
even for partially erroneous code possible
- better cython support
- scripts (dhparser.py, dhparser_rename.py) moved to
DHParser/scripts-directory
- syntaxtree.py streamlined
(breaking change: Node.select_by_tag() remove, use Node.select() instead
- added DHParser/templates subdirectory and moved larger code templates
from dhparser.py script to the templates-subdirectory

20.8.2018

..................................

- new transformation function collapse_children_if()
- restored compatibility with Python 3.4
- StepByStep Guide typos fixed
- bug fixes

19.10.2024

...................................

- optional speed optimizations (experimental!) that work by compiling
certain parts of the grammar to regular expressions. See config value
"optimizations" or put "optimizations=all" at the top of your grammar.
- serializations for xast and unist ("ndst") added.
See https://github.com/syntax-tree/unist
and https://github.com/syntax-tree/xast
- fast-path for Series-parser, in case no items are marked as mandatory
- faster unit-tests: History recording will only be invoked if a
test fails in which case the test will be repeated with history
recording. (If a tested parser contains lookahead statements,
history-recording is always invoked, because it is needed to
detect false negatives.)
- unit-test-scripts (i.e. "tst_..._grammary.py") can now be invoked
with the "--history" (or "-p") option to record detailed logs for all
tests, not only those tests that have failed. (So, it is easier to
study what a particular parser actually does.)
- functions added: nodetree.drop_leaf() and transform.pull_up()
- changes: parse.py: removed memoization equivalence classes to
simplify code (speed up was very neglible, anyway)
parse.py: Regular expressions of RegExp-parsers are now evaluated
lazily to keep startup times in check
- nim-rewrite of parser core under way, e.g. run-ranges added as
first step to get rid of regular epressions.
- lsp-module removed from documentation to avoid index-clutter

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.