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

Built Distribution

File details

Details for the file openzeppelin-solidity-grammar-parser-0.0.4.tar.gz.

File metadata

File hashes

Hashes for openzeppelin-solidity-grammar-parser-0.0.4.tar.gz
Algorithm Hash digest
SHA256 63258e5c2cc661b42afb0ed4b0b6c92d06cb837d2b664928a30ffe524a0f278c
MD5 547831d3e7245c4edbfe94f799102870
BLAKE2b-256 a7f687a844199f5fbb26780787ed33f5f42add5ce5a8aa59d6dbdf9111c19176

See more details on using hashes here.

File details

Details for the file openzeppelin_solidity_grammar_parser-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for openzeppelin_solidity_grammar_parser-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 56219060a14ad4d88ce5ab7d6e40c88e95d9a3026dc775accf4cc111123d45f4
MD5 a9c099783654421adf922d12a43a287e
BLAKE2b-256 be436676be5a377ccd755d85fd3d0a1b8fa3c17da37ebbea3957c96efe773064

See more details on using hashes here.

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