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
Metadata
Release files for solidity-grammar-parser 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| solidity-grammar-parser-0.0.2.tar.gz | 72.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| solidity_grammar_parser-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 145.6 kB
Release files / solidity-grammar-parser-0.0.2.tar.gz
| Download URL | solidity-grammar-parser-0.0.2.tar.gz |
|---|---|
| Size | 72.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9252f0ee0116258f79dc5bf2a624ef10c19e638b8b47f824cb9ce2083fb422a5
|
|
BLAKE2b-256 checksum How to use checksums |
46451839dc02943a628206df07319fd91c01a00fa95488fefefa7c6ec079d3fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / solidity_grammar_parser-0.0.2-py3-none-any.whl
| Download URL | solidity_grammar_parser-0.0.2-py3-none-any.whl |
|---|---|
| Size | 73.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebb1b5ea726dd18f502861671ea94b240b8eba305d4105faa670373f059ecde8
|
|
BLAKE2b-256 checksum How to use checksums |
39b33454fb381fc4419323dca1721942184afe1283a387ec264bc0bc46af0371
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|