{"id":29089619,"url":"https://github.com/openzeppelin/sgp","last_synced_at":"2025-06-28T04:04:16.213Z","repository":{"id":196594531,"uuid":"695009012","full_name":"OpenZeppelin/sgp","owner":"OpenZeppelin","description":"Solidity ANTLR4 grammar Python parser","archived":false,"fork":false,"pushed_at":"2025-03-11T07:25:55.000Z","size":400,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T23:39:26.685Z","etag":null,"topics":["antlr4","antlr4-grammar","antlr4-python3","ast","solidity"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/openzeppelin-solidity-grammar-parser/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenZeppelin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-22T06:51:25.000Z","updated_at":"2025-04-04T03:35:21.000Z","dependencies_parsed_at":"2024-02-08T10:49:11.412Z","dependency_job_id":null,"html_url":"https://github.com/OpenZeppelin/sgp","commit_stats":null,"previous_names":["0xgeorgii/sgp","openzeppelin/sgp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenZeppelin/sgp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fsgp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fsgp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fsgp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fsgp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenZeppelin","download_url":"https://codeload.github.com/OpenZeppelin/sgp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenZeppelin%2Fsgp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262371684,"owners_count":23300595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antlr4","antlr4-grammar","antlr4-python3","ast","solidity"],"created_at":"2025-06-28T04:04:15.004Z","updated_at":"2025-06-28T04:04:16.203Z","avatar_url":"https://github.com/OpenZeppelin.png","language":"Python","readme":"[![Lint and test + coverage](https://github.com/OpenZeppelin/sgp/actions/workflows/lint-and-test.yml/badge.svg?branch=main)](https://github.com/OpenZeppelin/sgp/actions/workflows/lint-and-test.yml) [![ANTLR4 test](https://github.com/OpenZeppelin/sgp/actions/workflows/antlr4-test.yml/badge.svg)](https://github.com/OpenZeppelin/sgp/actions/workflows/antlr4-test.yml)\n\n# Solidity Grammar Parser\n\n**SGP** - is a `Python` package that allows to build an [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for a given [Solidity](https://solidity.readthedocs.io/)  source code.\n\n## Kudos\n\n- The original grammar [Solidity.g4](./Solidity.g4) was developed and maintained by [solidity-parser-antlr](https://github.com/solidity-parser/antlr).\n- The node types system and AST visitor are based on [solidity-parser-parser](https://github.com/solidity-parser/parser).\n\n## Build\n\nRun [build.sh](./build.sh) that does the following:\n- checks if `Python` is installed and downloads it if not\n  - including `pip`\n  - including `antlr4-python3-runtime` package\n- checks if `Java` is installed and downloads it if not\n  - including `jre`\n  - including `jdk`\n- checks if `antlr4.jar` is downloaded and downloads it if not\n- runs the ANTLR jar file and compiles the [Solidity.g4](./Solidity.g4) file.\n\nThe output result can be found in the [./out](./out) directory\n\n## Tests\n\nRun:\n- `python -m coverage run -m unittest discover -v \u0026\u0026 python -m coverage report` for the `Python` tests\n- [run-tests.sh](./test/test_parsing/run-tests.sh) to execute `antlr4` parse testing\n\n## License\n\n[MIT](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzeppelin%2Fsgp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenzeppelin%2Fsgp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzeppelin%2Fsgp/lists"}