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
File details
Details for the file openzeppelin-solidity-grammar-parser-0.0.4.tar.gz
.
File metadata
- Download URL: openzeppelin-solidity-grammar-parser-0.0.4.tar.gz
- Upload date:
- Size: 67.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63258e5c2cc661b42afb0ed4b0b6c92d06cb837d2b664928a30ffe524a0f278c |
|
MD5 | 547831d3e7245c4edbfe94f799102870 |
|
BLAKE2b-256 | a7f687a844199f5fbb26780787ed33f5f42add5ce5a8aa59d6dbdf9111c19176 |
File details
Details for the file openzeppelin_solidity_grammar_parser-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: openzeppelin_solidity_grammar_parser-0.0.4-py3-none-any.whl
- Upload date:
- Size: 70.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56219060a14ad4d88ce5ab7d6e40c88e95d9a3026dc775accf4cc111123d45f4 |
|
MD5 | a9c099783654421adf922d12a43a287e |
|
BLAKE2b-256 | be436676be5a377ccd755d85fd3d0a1b8fa3c17da37ebbea3957c96efe773064 |