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 is 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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a5506e185e71c49302c389e89290095ec1d43f7a716d08357d63c6c35e49640 |
|
MD5 | 72b1a29738be0a464ccbb64cf716ab14 |
|
BLAKE2b-256 | 603ea04cfcd33fe63d023e85621476cca6d7f064d2c50cbcc2ac9b51977251e3 |
Close
Hashes for solidity_grammar_parser-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e9e07d194f87e4585594465ab8b8f177d6f8afff458ee881a171139da89df6e |
|
MD5 | fe04a7ce4d1556a52d7bbff2eff105b8 |
|
BLAKE2b-256 | 3f10e3ad7187d6aeb107f4bc0643caa9bb9cc80c753278834f75ce8415f853f7 |