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
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
Run:
python -m coverage run -m unittest discover -v && python -m coverage report
for thePython
tests- run-tests.sh to execute
antlr4
parse testing