SGP - is a Python package that allows to build an AST for a given Solidity source code.
- 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.
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
Run:
python -m coverage run -m unittest discover -v && python -m coverage reportfor thePythontests- run-tests.sh to execute
antlr4parse testing