Solidity ANTLR4 grammar Python parser
Project description
Solidity Grammar Parser
SGP - is a Python package that allows to build an AST for a given Solidity source code.
Kudos
- The original grammar Solidity.g4 was developed and maintained by solidity-parser-antlr.
- The node types system and AST visitor are based on solidity-parser-parser.
Build
Run build.sh that does the following:
- checks if
Pythonis installed and downloads it if not- including
pip - including
antlr4-python3-runtimepackage
- including
- checks if
Javais installed and downloads it if not- including
jre - including
jdk
- including
- checks if
antlr4.jaris downloaded and downloads it if not - runs the ANTLR jar file and compiles the Solidity.g4 file.
The output result can be found in the ./out directory
Tests
Run:
python -m coverage run -m unittest discover -v && python -m coverage reportfor thePythontests- run-tests.sh to execute
antlr4parse testing
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solidity-grammar-parser-0.0.2.tar.gz.
File metadata
- Download URL: solidity-grammar-parser-0.0.2.tar.gz
- Upload date:
- Size: 72.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9252f0ee0116258f79dc5bf2a624ef10c19e638b8b47f824cb9ce2083fb422a5
|
|
| MD5 |
32f2d87c2ba9a7a841bf0d690e960f72
|
|
| BLAKE2b-256 |
46451839dc02943a628206df07319fd91c01a00fa95488fefefa7c6ec079d3fb
|
File details
Details for the file solidity_grammar_parser-0.0.2-py3-none-any.whl.
File metadata
- Download URL: solidity_grammar_parser-0.0.2-py3-none-any.whl
- Upload date:
- Size: 73.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebb1b5ea726dd18f502861671ea94b240b8eba305d4105faa670373f059ecde8
|
|
| MD5 |
605f32a56f6143167ae7b16ddf61f828
|
|
| BLAKE2b-256 |
39b33454fb381fc4419323dca1721942184afe1283a387ec264bc0bc46af0371
|