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
Python
is installed and downloads it if not- including
pip
- including
antlr4-python3-runtime
package
- including
- checks if
Java
is installed and downloads it if not- including
jre
- including
jdk
- including
- checks if
antlr4.jar
is 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 report
for thePython
tests- run-tests.sh to execute
antlr4
parse 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
Close
Hashes for solidity-grammar-parser-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9252f0ee0116258f79dc5bf2a624ef10c19e638b8b47f824cb9ce2083fb422a5 |
|
MD5 | 32f2d87c2ba9a7a841bf0d690e960f72 |
|
BLAKE2b-256 | 46451839dc02943a628206df07319fd91c01a00fa95488fefefa7c6ec079d3fb |
Close
Hashes for solidity_grammar_parser-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebb1b5ea726dd18f502861671ea94b240b8eba305d4105faa670373f059ecde8 |
|
MD5 | 605f32a56f6143167ae7b16ddf61f828 |
|
BLAKE2b-256 | 39b33454fb381fc4419323dca1721942184afe1283a387ec264bc0bc46af0371 |