The pyVHDLParser Documentation¶
This is a token-stream based parser for VHDL-2008 creating a document object model (DOM).
Important
This package requires Python 3.8+, because it uses some of the latest Python feature for effective code writing:
Pathlib (Python 3.4)
Type hints (Python 3.5) and for variables (Python 3.6)
Data classes (Python 3.7)
Assignment expressions (Python 3.8)
Main Goals¶
Parsing
Slice an input document into tokens and text blocks which are categorized in groups for fast indexing
Preserve case, whitespace and comments
Recover on parsing errors
Good error reporting / throw exceptions
Fast Processing
Multi-pass parsing and analysis
Delay analysis if not needed for current pass
Link tokens and blocks for fast-forward scanning (triple helix)
Generic VHDL Language Model
Assemble a sourcecode document-object-model (Code-DOM)
Provide an API for code introspection
Provide an API for code modification / transformation
See chapter Project Goals for details.
Use Cases¶
Generate documentation by using the fast-forward scanner
Generate a document/language model by using the grouped text-block scanner
Extract compile orders and other dependency graphs
Generate highlighted syntax
See also
See chapter Use Cases for details.
Parsing Approach¶
Slice an input document into tokens
Assemble tokens to text blocks which are categorized
Assemble text blocks for fast-forward scanning into groups (indexing)
Translate groups into a sourcecode document-object-model (Code-DOM)
Provide a generic VHDL language model
See also
See chapter Concepts for details.
Additional Aims¶
A VHDL domain for Sphinx
A autodoc plugin for the VHDL domain in Sphinx
VHDL plugins/extensions for style checkers supported by CI environments
Testing new VHDL language features beyond VHDL-2008/VHDL-2019
News¶
Mar. 2023 - Enhancements¶
Bumped dependencies to pyVHDLModel and updated interfaces.
CLI entrypoint will be installed as a binary.
Jun. 2021 - Enhancements¶
Added infrastructure to run example code provided in issues as testcase.
New Single-File GitHub Action workflow (pipeline).
Added Dependabot configuration file.
Updated dependencies
Sphinx uses now v4.0.2
Removed 2 patched Sphinx extensions → now using original extensions.
…
Nov. 2020 - Test cases¶
Added testcases for Tokenizer and block generation.
Added first testcases for pass 4 (Code-DOM)
Collect code and branch coverage.
Frontend.py
→ pyVHDLParser executable installed via pip
Dec. 2019 - Major reworks¶
Reworked and updated documentation.
Implemented a new test frontend.
Dec. 2018 - Minor updates¶
Fixed some NextToken linking problems.
Nov. 2017 - New features¶
Implemented new features like case statements.
20.09.2017 - Project started¶
Let’s create a new parser in Python to process VHDL code.
Contributors¶
Patrick Lehmann (Maintainer)
License¶
This library is licensed under Apache License 2.0.
This document was generated on 12.Jan 2024 - 01:04.