Skip to main content

Solidity ANTLR4 grammar Python parser

Project description

Lint and test + coverage ANTLR4 test

Solidity Grammar Parser

SGP - is a Python package that allows to build an AST for a given Solidity source code.

Kudos

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
  • checks if Java is installed and downloads it if not
    • including jre
    • including jdk
  • 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 the Python tests
  • run-tests.sh to execute antlr4 parse testing

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solidity-grammar-parser-0.0.2.tar.gz (72.1 kB view hashes)

Uploaded Source

Built Distribution

solidity_grammar_parser-0.0.2-py3-none-any.whl (73.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page