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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file solidity-grammar-parser-0.0.2.tar.gz.

File metadata

  • Download URL: solidity-grammar-parser-0.0.2.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for solidity-grammar-parser-0.0.2.tar.gz
Algorithm Hash digest
SHA256 9252f0ee0116258f79dc5bf2a624ef10c19e638b8b47f824cb9ce2083fb422a5
MD5 32f2d87c2ba9a7a841bf0d690e960f72
BLAKE2b-256 46451839dc02943a628206df07319fd91c01a00fa95488fefefa7c6ec079d3fb

See more details on using hashes here.

File details

Details for the file solidity_grammar_parser-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for solidity_grammar_parser-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ebb1b5ea726dd18f502861671ea94b240b8eba305d4105faa670373f059ecde8
MD5 605f32a56f6143167ae7b16ddf61f828
BLAKE2b-256 39b33454fb381fc4419323dca1721942184afe1283a387ec264bc0bc46af0371

See more details on using hashes here.

Supported by

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