{"id":18592607,"url":"https://github.com/bytebase/snowsql-parser","last_synced_at":"2025-11-02T03:30:30.512Z","repository":{"id":172340221,"uuid":"649168647","full_name":"bytebase/snowsql-parser","owner":"bytebase","description":"Snowflake parser on ANTLR4","archived":false,"fork":false,"pushed_at":"2025-01-24T07:52:14.000Z","size":5372,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T17:56:38.638Z","etag":null,"topics":["antlr","antlr-parser","antlr4","database","parser","snowflake","sql"],"latest_commit_sha":null,"homepage":"https://www.bytebase.com","language":"ANTLR","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytebase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-06-04T02:16:31.000Z","updated_at":"2025-01-24T07:52:19.000Z","dependencies_parsed_at":"2023-07-25T20:31:12.052Z","dependency_job_id":null,"html_url":"https://github.com/bytebase/snowsql-parser","commit_stats":null,"previous_names":["bytebase/snowsql-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fsnowsql-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fsnowsql-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fsnowsql-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fsnowsql-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebase","download_url":"https://codeload.github.com/bytebase/snowsql-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239370397,"owners_count":19627427,"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":["antlr","antlr-parser","antlr4","database","parser","snowflake","sql"],"created_at":"2024-11-07T01:09:13.718Z","updated_at":"2025-11-02T03:30:30.457Z","avatar_url":"https://github.com/bytebase.png","language":"ANTLR","readme":"The plsql-parser is a parser for Snowflake. It is based on the [ANTLR4](https://github.com/antlr/antlr4) and use the grammar from [antlr4-grammars-plsql](https://github.com/antlr/grammars-v4/tree/master/sql/snowflake).\n\n## Build\n\nBefore build, you need to install the ANTLR4.\n\nrequirements:\n- https://github.com/antlr/antlr4/blob/master/doc/getting-started.md\n- https://github.com/antlr/antlr4/blob/master/doc/go-target.md\n\n```bash\n./build.sh\n```\n\n## Update grammar\n\n### Manually change the grammar file in this project\n\n1. run `./build.sh` to generate the parser code.\n\n### From antlr4-grammars-plsql\n\n1. Clone the `SnowflakeLexer.g4` and `SnowflakeParser.g4` grammar files from https://github.com/antlr/grammars-v4/tree/master/sql/snowflake.\n1. run `./build.sh` to generate the parser code.\n\n## Test the parser\n\nRun `TestSnowflakeSQLParser` in `parser_test.go` to test the parser.\n\n```bash\ngo test -v\n```\n\n## References\n\n- ANTLR4 Getting Started https://github.com/antlr/antlr4/blob/master/doc/getting-started.md\n- ANTLR4 Go Garget https://github.com/antlr/antlr4/blob/master/doc/go-target.md","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fsnowsql-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebase%2Fsnowsql-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fsnowsql-parser/lists"}