Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
id: set-matrix
run: |
# List of all available parsers
ALL_PARSERS="redshift postgresql cql snowflake tsql doris"
ALL_PARSERS="redshift postgresql cql snowflake tsql doris trino"
# Add more parsers here as they are added to the repository
# ALL_PARSERS="redshift mysql postgresql"

Expand Down
7 changes: 7 additions & 0 deletions trino/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
all: build test

build:
antlr -Dlanguage=Go -package trino -visitor -o . TrinoLexer.g4 TrinoParser.g4

test:
go test -v -run TestTrinoParser
9 changes: 9 additions & 0 deletions trino/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Trino grammar for ANTLR4

An ANTLR4 grammar for Trino, formerly known as PrestoSQL.
This grammar is based on the actively maintained [Trino repository](https://github.com/trinodb/trino).

The lexer and parser are referenced from the [offical base antlr file](https://github.com/trinodb/trino/blob/master/core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4).
Changes are made to accommodate various language targets as the official one is being developed for Java only.

The examples are extracted from the [offical test file](https://github.com/trinodb/trino/blob/master/core/trino-parser/src/test/java/io/trino/sql/parser/TestSqlParser.java).
Loading