From 8ee8e621b5f418daa904d5ce9d984e516de08aaf Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 17:20:30 -0500 Subject: [PATCH 01/17] Minimal tree-sitter. --- .editorconfig | 46 + .gitattributes | 37 + CMakeLists.txt | 58 + Cargo.toml | 27 + Makefile | 94 + Package.swift | 37 + binding.gyp | 30 + bindings/c/tree-sitter-base_sql.h | 16 + bindings/c/tree-sitter-base_sql.pc.in | 10 + bindings/go/binding.go | 13 + bindings/go/binding_test.go | 15 + bindings/node/binding.cc | 20 + bindings/node/binding_test.js | 9 + bindings/node/index.d.ts | 28 + bindings/node/index.js | 11 + bindings/python/tests/test_binding.py | 11 + .../python/tree_sitter_base_sql/__init__.py | 42 + .../python/tree_sitter_base_sql/__init__.pyi | 10 + .../python/tree_sitter_base_sql/binding.c | 27 + bindings/python/tree_sitter_base_sql/py.typed | 0 bindings/rust/build.rs | 22 + bindings/rust/lib.rs | 53 + bindings/swift/TreeSitterBaseSql/base_sql.h | 16 + .../TreeSitterBaseSqlTests.swift | 12 + examples/select_one.sql | 1 + go.mod | 5 + grammar.js | 201 + package.json | 7 +- pyproject.toml | 29 + setup.py | 62 + src/grammar.json | 1091 ++++ src/node-types.json | 577 ++ src/parser.c | 5266 +++++++++++++++++ src/tree_sitter/alloc.h | 54 + src/tree_sitter/array.h | 290 + src/tree_sitter/parser.h | 266 + tree-sitter.json | 34 + yarn.lock | 23 + 38 files changed, 8548 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 CMakeLists.txt create mode 100644 Cargo.toml create mode 100644 Makefile create mode 100644 Package.swift create mode 100644 binding.gyp create mode 100644 bindings/c/tree-sitter-base_sql.h create mode 100644 bindings/c/tree-sitter-base_sql.pc.in create mode 100644 bindings/go/binding.go create mode 100644 bindings/go/binding_test.go create mode 100644 bindings/node/binding.cc create mode 100644 bindings/node/binding_test.js create mode 100644 bindings/node/index.d.ts create mode 100644 bindings/node/index.js create mode 100644 bindings/python/tests/test_binding.py create mode 100644 bindings/python/tree_sitter_base_sql/__init__.py create mode 100644 bindings/python/tree_sitter_base_sql/__init__.pyi create mode 100644 bindings/python/tree_sitter_base_sql/binding.c create mode 100644 bindings/python/tree_sitter_base_sql/py.typed create mode 100644 bindings/rust/build.rs create mode 100644 bindings/rust/lib.rs create mode 100644 bindings/swift/TreeSitterBaseSql/base_sql.h create mode 100644 bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift create mode 100644 examples/select_one.sql create mode 100644 go.mod create mode 100644 grammar.js create mode 100644 pyproject.toml create mode 100644 setup.py create mode 100644 src/grammar.json create mode 100644 src/node-types.json create mode 100644 src/parser.c create mode 100644 src/tree_sitter/alloc.h create mode 100644 src/tree_sitter/array.h create mode 100644 src/tree_sitter/parser.h create mode 100644 tree-sitter.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..65330c4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,46 @@ +root = true + +[*] +charset = utf-8 + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.scm] +indent_style = space +indent_size = 2 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 + +[parser.c] +indent_size = 2 + +[{alloc,array,parser}.h] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7e2cae0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,37 @@ +* text=auto eol=lf + +# Generated source files +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +# C bindings +bindings/c/* linguist-generated +CMakeLists.txt linguist-generated +Makefile linguist-generated + +# Rust bindings +bindings/rust/* linguist-generated +Cargo.toml linguist-generated +Cargo.lock linguist-generated + +# Node.js bindings +bindings/node/* linguist-generated +binding.gyp linguist-generated +package.json linguist-generated +package-lock.json linguist-generated + +# Python bindings +bindings/python/** linguist-generated +setup.py linguist-generated +pyproject.toml linguist-generated + +# Go bindings +bindings/go/* linguist-generated +go.mod linguist-generated +go.sum linguist-generated + +# Swift bindings +bindings/swift/** linguist-generated +Package.swift linguist-generated +Package.resolved linguist-generated diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5854ff6 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.13) + +project(tree-sitter-base_sql + VERSION "0.1.0" + DESCRIPTION "Common functionality shared across SQL dialects." + HOMEPAGE_URL "https://github.com/tree-sitter/tree-sitter-base_sql" + LANGUAGES C) + +option(BUILD_SHARED_LIBS "Build using shared libraries" ON) +option(TREE_SITTER_REUSE_ALLOCATOR "Reuse the library allocator" OFF) + +set(TREE_SITTER_ABI_VERSION 14 CACHE STRING "Tree-sitter ABI version") +if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") + unset(TREE_SITTER_ABI_VERSION CACHE) + message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") +endif() + +find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") + +add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" + COMMAND "${TREE_SITTER_CLI}" generate src/grammar.json + --abi=${TREE_SITTER_ABI_VERSION} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Generating parser.c") + +add_library(tree-sitter-base_sql src/parser.c) +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) + target_sources(tree-sitter-base_sql PRIVATE src/scanner.c) +endif() +target_include_directories(tree-sitter-base_sql PRIVATE src) + +target_compile_definitions(tree-sitter-base_sql PRIVATE + $<$:TREE_SITTER_REUSE_ALLOCATOR> + $<$:TREE_SITTER_DEBUG>) + +set_target_properties(tree-sitter-base_sql + PROPERTIES + C_STANDARD 11 + POSITION_INDEPENDENT_CODE ON + SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" + DEFINE_SYMBOL "") + +configure_file(bindings/c/tree-sitter-base_sql.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-base_sql.pc" @ONLY) + +include(GNUInstallDirs) + +install(FILES bindings/c/tree-sitter-base_sql.h + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter") +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-base_sql.pc" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig") +install(TARGETS tree-sitter-base_sql + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +add_custom_target(ts-test "${TREE_SITTER_CLI}" test + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "tree-sitter test") diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..5623453 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "tree-sitter-base-sql" +description = "Common functionality shared across SQL dialects." +version = "0.1.0" +authors = ["Vinesh Kannan and Tamjid Rahman"] +license = "MIT" +readme = "README.md" +keywords = ["incremental", "parsing", "tree-sitter", "base-sql"] +categories = ["parsing", "text-editors"] +repository = "https://github.com/tree-sitter/tree-sitter-base_sql" +edition = "2021" +autoexamples = false + +build = "bindings/rust/build.rs" +include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json"] + +[lib] +path = "bindings/rust/lib.rs" + +[dependencies] +tree-sitter-language = "0.1" + +[build-dependencies] +cc = "1.1.22" + +[dev-dependencies] +tree-sitter = "0.24.4" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..aab515a --- /dev/null +++ b/Makefile @@ -0,0 +1,94 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + +LANGUAGE_NAME := tree-sitter-base_sql +HOMEPAGE_URL := https://github.com/tree-sitter/tree-sitter-base_sql +VERSION := 0.1.0 + +# repository +SRC_DIR := src + +TS ?= tree-sitter + +# install directory layout +PREFIX ?= /usr/local +INCLUDEDIR ?= $(PREFIX)/include +LIBDIR ?= $(PREFIX)/lib +PCLIBDIR ?= $(LIBDIR)/pkgconfig + +# source/object files +PARSER := $(SRC_DIR)/parser.c +EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c)) +OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) + +# flags +ARFLAGS ?= rcs +override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC + +# ABI versioning +SONAME_MAJOR = $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER)) +SONAME_MINOR = $(word 1,$(subst ., ,$(VERSION))) + +# OS-specific bits +ifeq ($(shell uname),Darwin) + SOEXT = dylib + SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) + SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) + LINKSHARED = -dynamiclib -Wl,-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks +else + SOEXT = so + SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) + SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) + LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) +endif +ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) + PCLIBDIR := $(PREFIX)/libdata/pkgconfig +endif + +all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc + +lib$(LANGUAGE_NAME).a: $(OBJS) + $(AR) $(ARFLAGS) $@ $^ + +lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) + $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ +ifneq ($(STRIP),) + $(STRIP) $@ +endif + +$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in + sed -e 's|@PROJECT_VERSION@|$(VERSION)|' \ + -e 's|@CMAKE_INSTALL_LIBDIR@|$(LIBDIR:$(PREFIX)/%=%)|' \ + -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ + -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ + -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ + -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@ + +$(PARSER): $(SRC_DIR)/grammar.json + $(TS) generate $^ + +install: all + install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' + install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h + install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a + install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) + ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) + +uninstall: + $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ + '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ + '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ + '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc + +clean: + $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) + +test: + $(TS) test + +.PHONY: all install uninstall clean test diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..05dec4c --- /dev/null +++ b/Package.swift @@ -0,0 +1,37 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterBaseSql", + products: [ + .library(name: "TreeSitterBaseSql", targets: ["TreeSitterBaseSql"]), + ], + dependencies: [ + .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), + ], + targets: [ + .target( + name: "TreeSitterBaseSql", + dependencies: [], + path: ".", + sources: [ + "src/parser.c", + // NOTE: if your language has an external scanner, add it here. + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] + ), + .testTarget( + name: "TreeSitterBaseSqlTests", + dependencies: [ + "SwiftTreeSitter", + "TreeSitterBaseSql", + ], + path: "bindings/swift/TreeSitterBaseSqlTests" + ) + ], + cLanguageStandard: .c11 +) diff --git a/binding.gyp b/binding.gyp new file mode 100644 index 0000000..c2abd0f --- /dev/null +++ b/binding.gyp @@ -0,0 +1,30 @@ +{ + "targets": [ + { + "target_name": "tree_sitter_base_sql_binding", + "dependencies": [ + " + +typedef struct TSLanguage TSLanguage; + +extern "C" TSLanguage *tree_sitter_base_sql(); + +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; + +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "base_sql"); + auto language = Napi::External::New(env, tree_sitter_base_sql()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; +} + +NODE_API_MODULE(tree_sitter_base_sql_binding, Init) diff --git a/bindings/node/binding_test.js b/bindings/node/binding_test.js new file mode 100644 index 0000000..55becac --- /dev/null +++ b/bindings/node/binding_test.js @@ -0,0 +1,9 @@ +const assert = require("node:assert"); +const { test } = require("node:test"); + +const Parser = require("tree-sitter"); + +test("can load grammar", () => { + const parser = new Parser(); + assert.doesNotThrow(() => parser.setLanguage(require("."))); +}); diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts new file mode 100644 index 0000000..efe259e --- /dev/null +++ b/bindings/node/index.d.ts @@ -0,0 +1,28 @@ +type BaseNode = { + type: string; + named: boolean; +}; + +type ChildNode = { + multiple: boolean; + required: boolean; + types: BaseNode[]; +}; + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[]; + }) + | (BaseNode & { + fields: { [name: string]: ChildNode }; + children: ChildNode[]; + }); + +type Language = { + name: string; + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/bindings/node/index.js b/bindings/node/index.js new file mode 100644 index 0000000..08cd515 --- /dev/null +++ b/bindings/node/index.js @@ -0,0 +1,11 @@ +const root = require("path").join(__dirname, "..", ".."); + +module.exports = + typeof process.versions.bun === "string" + // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time + ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-base_sql.node`) + : require("node-gyp-build")(root); + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} diff --git a/bindings/python/tests/test_binding.py b/bindings/python/tests/test_binding.py new file mode 100644 index 0000000..5049747 --- /dev/null +++ b/bindings/python/tests/test_binding.py @@ -0,0 +1,11 @@ +from unittest import TestCase + +import tree_sitter, tree_sitter_base_sql + + +class TestLanguage(TestCase): + def test_can_load_grammar(self): + try: + tree_sitter.Language(tree_sitter_base_sql.language()) + except Exception: + self.fail("Error loading BaseSql grammar") diff --git a/bindings/python/tree_sitter_base_sql/__init__.py b/bindings/python/tree_sitter_base_sql/__init__.py new file mode 100644 index 0000000..9eb555c --- /dev/null +++ b/bindings/python/tree_sitter_base_sql/__init__.py @@ -0,0 +1,42 @@ +"""Common functionality shared across SQL dialects.""" + +from importlib.resources import files as _files + +from ._binding import language + + +def _get_query(name, file): + query = _files(f"{__package__}.queries") / file + globals()[name] = query.read_text() + return globals()[name] + + +def __getattr__(name): + # NOTE: uncomment these to include any queries that this grammar contains: + + # if name == "HIGHLIGHTS_QUERY": + # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") + # if name == "INJECTIONS_QUERY": + # return _get_query("INJECTIONS_QUERY", "injections.scm") + # if name == "LOCALS_QUERY": + # return _get_query("LOCALS_QUERY", "locals.scm") + # if name == "TAGS_QUERY": + # return _get_query("TAGS_QUERY", "tags.scm") + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + + +__all__ = [ + "language", + # "HIGHLIGHTS_QUERY", + # "INJECTIONS_QUERY", + # "LOCALS_QUERY", + # "TAGS_QUERY", +] + + +def __dir__(): + return sorted(__all__ + [ + "__all__", "__builtins__", "__cached__", "__doc__", "__file__", + "__loader__", "__name__", "__package__", "__path__", "__spec__", + ]) diff --git a/bindings/python/tree_sitter_base_sql/__init__.pyi b/bindings/python/tree_sitter_base_sql/__init__.pyi new file mode 100644 index 0000000..abf6633 --- /dev/null +++ b/bindings/python/tree_sitter_base_sql/__init__.pyi @@ -0,0 +1,10 @@ +from typing import Final + +# NOTE: uncomment these to include any queries that this grammar contains: + +# HIGHLIGHTS_QUERY: Final[str] +# INJECTIONS_QUERY: Final[str] +# LOCALS_QUERY: Final[str] +# TAGS_QUERY: Final[str] + +def language() -> object: ... diff --git a/bindings/python/tree_sitter_base_sql/binding.c b/bindings/python/tree_sitter_base_sql/binding.c new file mode 100644 index 0000000..8eb13d9 --- /dev/null +++ b/bindings/python/tree_sitter_base_sql/binding.c @@ -0,0 +1,27 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_base_sql(void); + +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_base_sql(), "tree_sitter.Language", NULL); +} + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = -1, + .m_methods = methods +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModule_Create(&module); +} diff --git a/bindings/python/tree_sitter_base_sql/py.typed b/bindings/python/tree_sitter_base_sql/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs new file mode 100644 index 0000000..ff6a868 --- /dev/null +++ b/bindings/rust/build.rs @@ -0,0 +1,22 @@ +fn main() { + let src_dir = std::path::Path::new("src"); + + let mut c_config = cc::Build::new(); + c_config.std("c11").include(src_dir); + + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); + + let parser_path = src_dir.join("parser.c"); + c_config.file(&parser_path); + println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + + // NOTE: if your language uses an external scanner, uncomment this block: + /* + let scanner_path = src_dir.join("scanner.c"); + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + */ + + c_config.compile("tree-sitter-base_sql"); +} diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs new file mode 100644 index 0000000..5000dd2 --- /dev/null +++ b/bindings/rust/lib.rs @@ -0,0 +1,53 @@ +//! This crate provides BaseSql language support for the [tree-sitter][] parsing library. +//! +//! Typically, you will use the [LANGUAGE][] constant to add this language to a +//! tree-sitter [Parser][], and then use the parser to parse some code: +//! +//! ``` +//! let code = r#" +//! "#; +//! let mut parser = tree_sitter::Parser::new(); +//! let language = tree_sitter_base_sql::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading BaseSql parser"); +//! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); +//! ``` +//! +//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html +//! [tree-sitter]: https://tree-sitter.github.io/ + +use tree_sitter_language::LanguageFn; + +extern "C" { + fn tree_sitter_base_sql() -> *const (); +} + +/// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar. +/// +/// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_base_sql) }; + +/// The content of the [`node-types.json`][] file for this grammar. +/// +/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); + +// NOTE: uncomment these to include any queries that this grammar contains: + +// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); + +#[cfg(test)] +mod tests { + #[test] + fn test_can_load_grammar() { + let mut parser = tree_sitter::Parser::new(); + parser + .set_language(&super::LANGUAGE.into()) + .expect("Error loading BaseSql parser"); + } +} diff --git a/bindings/swift/TreeSitterBaseSql/base_sql.h b/bindings/swift/TreeSitterBaseSql/base_sql.h new file mode 100644 index 0000000..c718758 --- /dev/null +++ b/bindings/swift/TreeSitterBaseSql/base_sql.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_BASE_SQL_H_ +#define TREE_SITTER_BASE_SQL_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_base_sql(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_BASE_SQL_H_ diff --git a/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift b/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift new file mode 100644 index 0000000..b9231d8 --- /dev/null +++ b/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift @@ -0,0 +1,12 @@ +import XCTest +import SwiftTreeSitter +import TreeSitterBaseSql + +final class TreeSitterBaseSqlTests: XCTestCase { + func testCanLoadGrammar() throws { + let parser = Parser() + let language = Language(language: tree_sitter_base_sql()) + XCTAssertNoThrow(try parser.setLanguage(language), + "Error loading BaseSql grammar") + } +} diff --git a/examples/select_one.sql b/examples/select_one.sql new file mode 100644 index 0000000..027b7d6 --- /dev/null +++ b/examples/select_one.sql @@ -0,0 +1 @@ +SELECT 1; \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2da404a --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/tree-sitter/tree-sitter-base_sql + +go 1.22 + +require github.com/tree-sitter/go-tree-sitter v0.24.0 diff --git a/grammar.js b/grammar.js new file mode 100644 index 0000000..d49c570 --- /dev/null +++ b/grammar.js @@ -0,0 +1,201 @@ +/** + * @file Common functionality shared across SQL dialects. + * @author Vinesh Kannan and Tamjid Rahman + * @license MIT + */ + +/// + +export default grammar({ + name: "base_sql", + + rules: { + source_file: $ => repeat($._statement), + + _statement: $ => seq( + choice( + $.select_statement, + // $.insert_statement, + // $.update_statement, + // $.delete_statement, + // $.create_table_statement + ), + optional(';') + ), + + // SELECT statement and its components + select_statement: $ => seq( + 'SELECT', + $._select_elements, + optional($._from_clause), + optional($._where_clause), + optional($._group_by_clause), + optional($._having_clause), + optional($._order_by_clause), + optional($._limit_clause) + ), + + _select_elements: $ => choice( + '*', + commaSep1($._select_element) + ), + + _select_element: $ => prec(1, choice( + $._expression, + $.column_reference, + $.alias + )), + + alias: $ => seq( + $._expression, + 'AS', + $.identifier + ), + + _from_clause: $ => seq( + 'FROM', + commaSep1($._table_reference) + ), + + _table_reference: $ => choice( + $.table_name, + $.join_clause + ), + + join_clause: $ => prec.left(seq( + $._table_reference, + repeat1(seq( + choice( + 'JOIN', + seq('LEFT', optional('OUTER'), 'JOIN'), + seq('RIGHT', optional('OUTER'), 'JOIN'), + seq('INNER', 'JOIN'), + seq('FULL', optional('OUTER'), 'JOIN') + ), + $._table_reference, + 'ON', + $._expression + )) + )), + + _where_clause: $ => seq( + 'WHERE', + $._expression + ), + + _group_by_clause: $ => seq( + 'GROUP', + 'BY', + commaSep1($._expression) + ), + + _having_clause: $ => seq( + 'HAVING', + $._expression + ), + + _order_by_clause: $ => seq( + 'ORDER', + 'BY', + commaSep1($.order_by_element) + ), + + order_by_element: $ => seq( + $._expression, + optional(choice('ASC', 'DESC')) + ), + + _limit_clause: $ => seq( + 'LIMIT', + $.number + ), + + // Basic expressions + _expression: $ => prec(0, choice( + $.binary_expression, + $.unary_expression, + $.parenthesized_expression, + $.function_call, + $.column_reference, + $.literal + )), + + binary_expression: $ => choice( + ...[ + ['AND', 2], + ['OR', 1], + ['=', 3], + ['!=', 3], + ['<>', 3], + ['<', 3], + ['<=', 3], + ['>', 3], + ['>=', 3], + ['+', 4], + ['-', 4], + ['*', 5], + ['/', 5], + ].map(([operator, precedence]) => + prec.left(precedence, seq( + $._expression, + operator, + $._expression + )) + ) + ), + + unary_expression: $ => choice( + prec(6, seq('NOT', $._expression)), + prec(6, seq('-', $._expression)) + ), + + parenthesized_expression: $ => seq( + '(', + $._expression, + ')' + ), + + function_call: $ => seq( + $.identifier, + '(', + optional(commaSep1($._expression)), + ')' + ), + + // Basic elements + column_reference: $ => seq( + optional(seq($.identifier, '.')), + $.identifier + ), + + table_name: $ => seq( + optional(seq($.identifier, '.')), + $.identifier + ), + + literal: $ => choice( + $.string, + $.number, + $.boolean, + $.null + ), + + string: $ => choice( + seq("'", /[^']*/, "'"), + seq('"', /[^"]*/, '"') + ), + + number: $ => /\d+(\.\d+)?/, + + boolean: $ => choice('TRUE', 'FALSE'), + + null: $ => 'NULL', + + identifier: $ => /[a-zA-Z_][a-zA-Z0-9_]*/, + } +}); + +// Helper functions for common patterns +function commaSep1(rule) { + return seq(rule, repeat(seq(',', rule))); +} diff --git a/package.json b/package.json index 580e1b7..5301a7c 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,15 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "tree-sitter": "tree-sitter" }, "dependencies": { "@duckdb/duckdb-wasm": "^1.29.0", "react": "^18.3.1", - "react-dom": "^18.3.1" + "react-dom": "^18.3.1", + "tree-sitter": "^0.22.1", + "tree-sitter-cli": "^0.24.4" }, "devDependencies": { "@eslint/js": "^9.11.1", diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..da6daa9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-base-sql" +description = "Common functionality shared across SQL dialects." +version = "0.1.0" +keywords = ["incremental", "parsing", "tree-sitter", "base-sql"] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed", +] +authors = [{ name = "Vinesh Kannan and Tamjid Rahman" }] +requires-python = ">=3.9" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter/tree-sitter-base_sql" + +[project.optional-dependencies] +core = ["tree-sitter~=0.22"] + +[tool.cibuildwheel] +build = "cp39-*" +build-frontend = "build" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..941bbe1 --- /dev/null +++ b/setup.py @@ -0,0 +1,62 @@ +from os.path import isdir, join +from platform import system + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if isdir("queries"): + dest = join(self.build_lib, "tree_sitter_base_sql", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + python, abi = "cp39", "abi3" + return python, abi, platform + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_base_sql": ["*.pyi", "py.typed"], + "tree_sitter_base_sql.queries": ["*.scm"], + }, + ext_package="tree_sitter_base_sql", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_base_sql/binding.c", + "src/parser.c", + # NOTE: if your language uses an external scanner, add it here. + ], + extra_compile_args=[ + "-std=c11", + "-fvisibility=hidden", + ] if system() != "Windows" else [ + "/std:c11", + "/utf-8", + ], + define_macros=[ + ("Py_LIMITED_API", "0x03090000"), + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), + ], + include_dirs=["src"], + py_limited_api=True, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel + }, + zip_safe=False +) diff --git a/src/grammar.json b/src/grammar.json new file mode 100644 index 0000000..a939063 --- /dev/null +++ b/src/grammar.json @@ -0,0 +1,1091 @@ +{ + "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", + "name": "base_sql", + "rules": { + "source_file": { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "_statement" + } + }, + "_statement": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "select_statement" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": ";" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "select_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "SELECT" + }, + { + "type": "SYMBOL", + "name": "_select_elements" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_from_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_where_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_group_by_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_having_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_order_by_clause" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_limit_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_select_elements": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "*" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_select_element" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_select_element" + } + ] + } + } + ] + } + ] + }, + "_select_element": { + "type": "PREC", + "value": 1, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "SYMBOL", + "name": "column_reference" + }, + { + "type": "SYMBOL", + "name": "alias" + } + ] + } + }, + "alias": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "AS" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "_from_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "FROM" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_table_reference" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_table_reference" + } + ] + } + } + ] + } + ] + }, + "_table_reference": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "table_name" + }, + { + "type": "SYMBOL", + "name": "join_clause" + } + ] + }, + "join_clause": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_table_reference" + }, + { + "type": "REPEAT1", + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "JOIN" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "LEFT" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "RIGHT" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "INNER" + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "FULL" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "_table_reference" + }, + { + "type": "STRING", + "value": "ON" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + } + }, + "_where_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "WHERE" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "_group_by_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "GROUP" + }, + { + "type": "STRING", + "value": "BY" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + } + ] + }, + "_having_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "HAVING" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "_order_by_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "ORDER" + }, + { + "type": "STRING", + "value": "BY" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "order_by_element" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "order_by_element" + } + ] + } + } + ] + } + ] + }, + "order_by_element": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "ASC" + }, + { + "type": "STRING", + "value": "DESC" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_limit_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "LIMIT" + }, + { + "type": "SYMBOL", + "name": "number" + } + ] + }, + "_expression": { + "type": "PREC", + "value": 0, + "content": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "binary_expression" + }, + { + "type": "SYMBOL", + "name": "unary_expression" + }, + { + "type": "SYMBOL", + "name": "parenthesized_expression" + }, + { + "type": "SYMBOL", + "name": "function_call" + }, + { + "type": "SYMBOL", + "name": "column_reference" + }, + { + "type": "SYMBOL", + "name": "literal" + } + ] + } + }, + "binary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC_LEFT", + "value": 2, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "AND" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "OR" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "!=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "<>" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "<" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "<=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ">" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ">=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "+" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 4, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "-" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "*" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 5, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "/" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + "unary_expression": { + "type": "CHOICE", + "members": [ + { + "type": "PREC", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "NOT" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + { + "type": "PREC", + "value": 6, + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "-" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + "parenthesized_expression": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "function_call": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "column_reference": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "table_name": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "." + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + }, + "literal": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "SYMBOL", + "name": "boolean" + }, + { + "type": "SYMBOL", + "name": "null" + } + ] + }, + "string": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "'" + }, + { + "type": "PATTERN", + "value": "[^']*" + }, + { + "type": "STRING", + "value": "'" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "\"" + }, + { + "type": "PATTERN", + "value": "[^\"]*" + }, + { + "type": "STRING", + "value": "\"" + } + ] + } + ] + }, + "number": { + "type": "PATTERN", + "value": "\\d+(\\.\\d+)?" + }, + "boolean": { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "TRUE" + }, + { + "type": "STRING", + "value": "FALSE" + } + ] + }, + "null": { + "type": "STRING", + "value": "NULL" + }, + "identifier": { + "type": "PATTERN", + "value": "[a-zA-Z_][a-zA-Z0-9_]*" + } + }, + "extras": [ + { + "type": "PATTERN", + "value": "\\s" + } + ], + "conflicts": [], + "precedences": [], + "externals": [], + "inline": [], + "supertypes": [] +} diff --git a/src/node-types.json b/src/node-types.json new file mode 100644 index 0000000..f2e4369 --- /dev/null +++ b/src/node-types.json @@ -0,0 +1,577 @@ +[ + { + "type": "alias", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "boolean", + "named": true, + "fields": {} + }, + { + "type": "column_reference", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "function_call", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "join_clause", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "join_clause", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "table_name", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "literal", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "boolean", + "named": true + }, + { + "type": "null", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "string", + "named": true + } + ] + } + }, + { + "type": "order_by_element", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "parenthesized_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "select_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "alias", + "named": true + }, + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "join_clause", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "number", + "named": true + }, + { + "type": "order_by_element", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "table_name", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "source_file", + "named": true, + "root": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "select_statement", + "named": true + } + ] + } + }, + { + "type": "string", + "named": true, + "fields": {} + }, + { + "type": "table_name", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "unary_expression", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "!=", + "named": false + }, + { + "type": "\"", + "named": false + }, + { + "type": "'", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, + { + "type": "*", + "named": false + }, + { + "type": "+", + "named": false + }, + { + "type": ",", + "named": false + }, + { + "type": "-", + "named": false + }, + { + "type": ".", + "named": false + }, + { + "type": "/", + "named": false + }, + { + "type": ";", + "named": false + }, + { + "type": "<", + "named": false + }, + { + "type": "<=", + "named": false + }, + { + "type": "<>", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": ">", + "named": false + }, + { + "type": ">=", + "named": false + }, + { + "type": "AND", + "named": false + }, + { + "type": "AS", + "named": false + }, + { + "type": "ASC", + "named": false + }, + { + "type": "BY", + "named": false + }, + { + "type": "DESC", + "named": false + }, + { + "type": "FALSE", + "named": false + }, + { + "type": "FROM", + "named": false + }, + { + "type": "FULL", + "named": false + }, + { + "type": "GROUP", + "named": false + }, + { + "type": "HAVING", + "named": false + }, + { + "type": "INNER", + "named": false + }, + { + "type": "JOIN", + "named": false + }, + { + "type": "LEFT", + "named": false + }, + { + "type": "LIMIT", + "named": false + }, + { + "type": "NOT", + "named": false + }, + { + "type": "ON", + "named": false + }, + { + "type": "OR", + "named": false + }, + { + "type": "ORDER", + "named": false + }, + { + "type": "OUTER", + "named": false + }, + { + "type": "RIGHT", + "named": false + }, + { + "type": "SELECT", + "named": false + }, + { + "type": "TRUE", + "named": false + }, + { + "type": "WHERE", + "named": false + }, + { + "type": "identifier", + "named": true + }, + { + "type": "null", + "named": true + }, + { + "type": "number", + "named": true + } +] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c new file mode 100644 index 0000000..2475461 --- /dev/null +++ b/src/parser.c @@ -0,0 +1,5266 @@ +#include "tree_sitter/parser.h" + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 14 +#define STATE_COUNT 169 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 78 +#define ALIAS_COUNT 0 +#define TOKEN_COUNT 47 +#define EXTERNAL_TOKEN_COUNT 0 +#define FIELD_COUNT 0 +#define MAX_ALIAS_SEQUENCE_LENGTH 8 +#define PRODUCTION_ID_COUNT 1 + +enum ts_symbol_identifiers { + anon_sym_SEMI = 1, + anon_sym_SELECT = 2, + anon_sym_STAR = 3, + anon_sym_COMMA = 4, + anon_sym_AS = 5, + anon_sym_FROM = 6, + anon_sym_JOIN = 7, + anon_sym_LEFT = 8, + anon_sym_OUTER = 9, + anon_sym_RIGHT = 10, + anon_sym_INNER = 11, + anon_sym_FULL = 12, + anon_sym_ON = 13, + anon_sym_WHERE = 14, + anon_sym_GROUP = 15, + anon_sym_BY = 16, + anon_sym_HAVING = 17, + anon_sym_ORDER = 18, + anon_sym_ASC = 19, + anon_sym_DESC = 20, + anon_sym_LIMIT = 21, + anon_sym_AND = 22, + anon_sym_OR = 23, + anon_sym_EQ = 24, + anon_sym_BANG_EQ = 25, + anon_sym_LT_GT = 26, + anon_sym_LT = 27, + anon_sym_LT_EQ = 28, + anon_sym_GT = 29, + anon_sym_GT_EQ = 30, + anon_sym_PLUS = 31, + anon_sym_DASH = 32, + anon_sym_SLASH = 33, + anon_sym_NOT = 34, + anon_sym_LPAREN = 35, + anon_sym_RPAREN = 36, + anon_sym_DOT = 37, + anon_sym_SQUOTE = 38, + aux_sym_string_token1 = 39, + anon_sym_DQUOTE = 40, + aux_sym_string_token2 = 41, + sym_number = 42, + anon_sym_TRUE = 43, + anon_sym_FALSE = 44, + sym_null = 45, + sym_identifier = 46, + sym_source_file = 47, + sym__statement = 48, + sym_select_statement = 49, + sym__select_elements = 50, + sym__select_element = 51, + sym_alias = 52, + sym__from_clause = 53, + sym__table_reference = 54, + sym_join_clause = 55, + sym__where_clause = 56, + sym__group_by_clause = 57, + sym__having_clause = 58, + sym__order_by_clause = 59, + sym_order_by_element = 60, + sym__limit_clause = 61, + sym__expression = 62, + sym_binary_expression = 63, + sym_unary_expression = 64, + sym_parenthesized_expression = 65, + sym_function_call = 66, + sym_column_reference = 67, + sym_table_name = 68, + sym_literal = 69, + sym_string = 70, + sym_boolean = 71, + aux_sym_source_file_repeat1 = 72, + aux_sym__select_elements_repeat1 = 73, + aux_sym__from_clause_repeat1 = 74, + aux_sym_join_clause_repeat1 = 75, + aux_sym__group_by_clause_repeat1 = 76, + aux_sym__order_by_clause_repeat1 = 77, +}; + +static const char * const ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [anon_sym_SEMI] = ";", + [anon_sym_SELECT] = "SELECT", + [anon_sym_STAR] = "*", + [anon_sym_COMMA] = ",", + [anon_sym_AS] = "AS", + [anon_sym_FROM] = "FROM", + [anon_sym_JOIN] = "JOIN", + [anon_sym_LEFT] = "LEFT", + [anon_sym_OUTER] = "OUTER", + [anon_sym_RIGHT] = "RIGHT", + [anon_sym_INNER] = "INNER", + [anon_sym_FULL] = "FULL", + [anon_sym_ON] = "ON", + [anon_sym_WHERE] = "WHERE", + [anon_sym_GROUP] = "GROUP", + [anon_sym_BY] = "BY", + [anon_sym_HAVING] = "HAVING", + [anon_sym_ORDER] = "ORDER", + [anon_sym_ASC] = "ASC", + [anon_sym_DESC] = "DESC", + [anon_sym_LIMIT] = "LIMIT", + [anon_sym_AND] = "AND", + [anon_sym_OR] = "OR", + [anon_sym_EQ] = "=", + [anon_sym_BANG_EQ] = "!=", + [anon_sym_LT_GT] = "<>", + [anon_sym_LT] = "<", + [anon_sym_LT_EQ] = "<=", + [anon_sym_GT] = ">", + [anon_sym_GT_EQ] = ">=", + [anon_sym_PLUS] = "+", + [anon_sym_DASH] = "-", + [anon_sym_SLASH] = "/", + [anon_sym_NOT] = "NOT", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_DOT] = ".", + [anon_sym_SQUOTE] = "'", + [aux_sym_string_token1] = "string_token1", + [anon_sym_DQUOTE] = "\"", + [aux_sym_string_token2] = "string_token2", + [sym_number] = "number", + [anon_sym_TRUE] = "TRUE", + [anon_sym_FALSE] = "FALSE", + [sym_null] = "null", + [sym_identifier] = "identifier", + [sym_source_file] = "source_file", + [sym__statement] = "_statement", + [sym_select_statement] = "select_statement", + [sym__select_elements] = "_select_elements", + [sym__select_element] = "_select_element", + [sym_alias] = "alias", + [sym__from_clause] = "_from_clause", + [sym__table_reference] = "_table_reference", + [sym_join_clause] = "join_clause", + [sym__where_clause] = "_where_clause", + [sym__group_by_clause] = "_group_by_clause", + [sym__having_clause] = "_having_clause", + [sym__order_by_clause] = "_order_by_clause", + [sym_order_by_element] = "order_by_element", + [sym__limit_clause] = "_limit_clause", + [sym__expression] = "_expression", + [sym_binary_expression] = "binary_expression", + [sym_unary_expression] = "unary_expression", + [sym_parenthesized_expression] = "parenthesized_expression", + [sym_function_call] = "function_call", + [sym_column_reference] = "column_reference", + [sym_table_name] = "table_name", + [sym_literal] = "literal", + [sym_string] = "string", + [sym_boolean] = "boolean", + [aux_sym_source_file_repeat1] = "source_file_repeat1", + [aux_sym__select_elements_repeat1] = "_select_elements_repeat1", + [aux_sym__from_clause_repeat1] = "_from_clause_repeat1", + [aux_sym_join_clause_repeat1] = "join_clause_repeat1", + [aux_sym__group_by_clause_repeat1] = "_group_by_clause_repeat1", + [aux_sym__order_by_clause_repeat1] = "_order_by_clause_repeat1", +}; + +static const TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_SELECT] = anon_sym_SELECT, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_AS] = anon_sym_AS, + [anon_sym_FROM] = anon_sym_FROM, + [anon_sym_JOIN] = anon_sym_JOIN, + [anon_sym_LEFT] = anon_sym_LEFT, + [anon_sym_OUTER] = anon_sym_OUTER, + [anon_sym_RIGHT] = anon_sym_RIGHT, + [anon_sym_INNER] = anon_sym_INNER, + [anon_sym_FULL] = anon_sym_FULL, + [anon_sym_ON] = anon_sym_ON, + [anon_sym_WHERE] = anon_sym_WHERE, + [anon_sym_GROUP] = anon_sym_GROUP, + [anon_sym_BY] = anon_sym_BY, + [anon_sym_HAVING] = anon_sym_HAVING, + [anon_sym_ORDER] = anon_sym_ORDER, + [anon_sym_ASC] = anon_sym_ASC, + [anon_sym_DESC] = anon_sym_DESC, + [anon_sym_LIMIT] = anon_sym_LIMIT, + [anon_sym_AND] = anon_sym_AND, + [anon_sym_OR] = anon_sym_OR, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, + [anon_sym_LT_GT] = anon_sym_LT_GT, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_NOT] = anon_sym_NOT, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_SQUOTE] = anon_sym_SQUOTE, + [aux_sym_string_token1] = aux_sym_string_token1, + [anon_sym_DQUOTE] = anon_sym_DQUOTE, + [aux_sym_string_token2] = aux_sym_string_token2, + [sym_number] = sym_number, + [anon_sym_TRUE] = anon_sym_TRUE, + [anon_sym_FALSE] = anon_sym_FALSE, + [sym_null] = sym_null, + [sym_identifier] = sym_identifier, + [sym_source_file] = sym_source_file, + [sym__statement] = sym__statement, + [sym_select_statement] = sym_select_statement, + [sym__select_elements] = sym__select_elements, + [sym__select_element] = sym__select_element, + [sym_alias] = sym_alias, + [sym__from_clause] = sym__from_clause, + [sym__table_reference] = sym__table_reference, + [sym_join_clause] = sym_join_clause, + [sym__where_clause] = sym__where_clause, + [sym__group_by_clause] = sym__group_by_clause, + [sym__having_clause] = sym__having_clause, + [sym__order_by_clause] = sym__order_by_clause, + [sym_order_by_element] = sym_order_by_element, + [sym__limit_clause] = sym__limit_clause, + [sym__expression] = sym__expression, + [sym_binary_expression] = sym_binary_expression, + [sym_unary_expression] = sym_unary_expression, + [sym_parenthesized_expression] = sym_parenthesized_expression, + [sym_function_call] = sym_function_call, + [sym_column_reference] = sym_column_reference, + [sym_table_name] = sym_table_name, + [sym_literal] = sym_literal, + [sym_string] = sym_string, + [sym_boolean] = sym_boolean, + [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, + [aux_sym__select_elements_repeat1] = aux_sym__select_elements_repeat1, + [aux_sym__from_clause_repeat1] = aux_sym__from_clause_repeat1, + [aux_sym_join_clause_repeat1] = aux_sym_join_clause_repeat1, + [aux_sym__group_by_clause_repeat1] = aux_sym__group_by_clause_repeat1, + [aux_sym__order_by_clause_repeat1] = aux_sym__order_by_clause_repeat1, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_SELECT] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_AS] = { + .visible = true, + .named = false, + }, + [anon_sym_FROM] = { + .visible = true, + .named = false, + }, + [anon_sym_JOIN] = { + .visible = true, + .named = false, + }, + [anon_sym_LEFT] = { + .visible = true, + .named = false, + }, + [anon_sym_OUTER] = { + .visible = true, + .named = false, + }, + [anon_sym_RIGHT] = { + .visible = true, + .named = false, + }, + [anon_sym_INNER] = { + .visible = true, + .named = false, + }, + [anon_sym_FULL] = { + .visible = true, + .named = false, + }, + [anon_sym_ON] = { + .visible = true, + .named = false, + }, + [anon_sym_WHERE] = { + .visible = true, + .named = false, + }, + [anon_sym_GROUP] = { + .visible = true, + .named = false, + }, + [anon_sym_BY] = { + .visible = true, + .named = false, + }, + [anon_sym_HAVING] = { + .visible = true, + .named = false, + }, + [anon_sym_ORDER] = { + .visible = true, + .named = false, + }, + [anon_sym_ASC] = { + .visible = true, + .named = false, + }, + [anon_sym_DESC] = { + .visible = true, + .named = false, + }, + [anon_sym_LIMIT] = { + .visible = true, + .named = false, + }, + [anon_sym_AND] = { + .visible = true, + .named = false, + }, + [anon_sym_OR] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_BANG_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_NOT] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_SQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_string_token1] = { + .visible = false, + .named = false, + }, + [anon_sym_DQUOTE] = { + .visible = true, + .named = false, + }, + [aux_sym_string_token2] = { + .visible = false, + .named = false, + }, + [sym_number] = { + .visible = true, + .named = true, + }, + [anon_sym_TRUE] = { + .visible = true, + .named = false, + }, + [anon_sym_FALSE] = { + .visible = true, + .named = false, + }, + [sym_null] = { + .visible = true, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [sym_source_file] = { + .visible = true, + .named = true, + }, + [sym__statement] = { + .visible = false, + .named = true, + }, + [sym_select_statement] = { + .visible = true, + .named = true, + }, + [sym__select_elements] = { + .visible = false, + .named = true, + }, + [sym__select_element] = { + .visible = false, + .named = true, + }, + [sym_alias] = { + .visible = true, + .named = true, + }, + [sym__from_clause] = { + .visible = false, + .named = true, + }, + [sym__table_reference] = { + .visible = false, + .named = true, + }, + [sym_join_clause] = { + .visible = true, + .named = true, + }, + [sym__where_clause] = { + .visible = false, + .named = true, + }, + [sym__group_by_clause] = { + .visible = false, + .named = true, + }, + [sym__having_clause] = { + .visible = false, + .named = true, + }, + [sym__order_by_clause] = { + .visible = false, + .named = true, + }, + [sym_order_by_element] = { + .visible = true, + .named = true, + }, + [sym__limit_clause] = { + .visible = false, + .named = true, + }, + [sym__expression] = { + .visible = false, + .named = true, + }, + [sym_binary_expression] = { + .visible = true, + .named = true, + }, + [sym_unary_expression] = { + .visible = true, + .named = true, + }, + [sym_parenthesized_expression] = { + .visible = true, + .named = true, + }, + [sym_function_call] = { + .visible = true, + .named = true, + }, + [sym_column_reference] = { + .visible = true, + .named = true, + }, + [sym_table_name] = { + .visible = true, + .named = true, + }, + [sym_literal] = { + .visible = true, + .named = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_boolean] = { + .visible = true, + .named = true, + }, + [aux_sym_source_file_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__select_elements_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__from_clause_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_join_clause_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__group_by_clause_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__order_by_clause_repeat1] = { + .visible = false, + .named = false, + }, +}; + +static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, +}; + +static const uint16_t ts_non_terminal_alias_map[] = { + 0, +}; + +static const TSStateId ts_primary_state_ids[STATE_COUNT] = { + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 3, + [4] = 2, + [5] = 5, + [6] = 6, + [7] = 7, + [8] = 8, + [9] = 9, + [10] = 10, + [11] = 11, + [12] = 12, + [13] = 13, + [14] = 14, + [15] = 15, + [16] = 16, + [17] = 17, + [18] = 17, + [19] = 19, + [20] = 20, + [21] = 21, + [22] = 3, + [23] = 5, + [24] = 6, + [25] = 7, + [26] = 8, + [27] = 9, + [28] = 10, + [29] = 11, + [30] = 12, + [31] = 13, + [32] = 14, + [33] = 15, + [34] = 16, + [35] = 35, + [36] = 36, + [37] = 37, + [38] = 38, + [39] = 39, + [40] = 40, + [41] = 41, + [42] = 42, + [43] = 43, + [44] = 44, + [45] = 45, + [46] = 40, + [47] = 47, + [48] = 48, + [49] = 49, + [50] = 50, + [51] = 51, + [52] = 52, + [53] = 53, + [54] = 48, + [55] = 47, + [56] = 56, + [57] = 57, + [58] = 58, + [59] = 59, + [60] = 49, + [61] = 50, + [62] = 51, + [63] = 63, + [64] = 64, + [65] = 52, + [66] = 21, + [67] = 53, + [68] = 20, + [69] = 58, + [70] = 19, + [71] = 71, + [72] = 64, + [73] = 71, + [74] = 59, + [75] = 75, + [76] = 76, + [77] = 77, + [78] = 76, + [79] = 79, + [80] = 80, + [81] = 45, + [82] = 82, + [83] = 83, + [84] = 84, + [85] = 85, + [86] = 86, + [87] = 86, + [88] = 88, + [89] = 89, + [90] = 90, + [91] = 91, + [92] = 92, + [93] = 93, + [94] = 94, + [95] = 95, + [96] = 96, + [97] = 97, + [98] = 98, + [99] = 99, + [100] = 100, + [101] = 101, + [102] = 102, + [103] = 103, + [104] = 80, + [105] = 105, + [106] = 106, + [107] = 107, + [108] = 105, + [109] = 109, + [110] = 103, + [111] = 111, + [112] = 106, + [113] = 113, + [114] = 84, + [115] = 115, + [116] = 116, + [117] = 117, + [118] = 118, + [119] = 119, + [120] = 120, + [121] = 121, + [122] = 122, + [123] = 123, + [124] = 124, + [125] = 125, + [126] = 126, + [127] = 127, + [128] = 128, + [129] = 129, + [130] = 127, + [131] = 131, + [132] = 132, + [133] = 131, + [134] = 129, + [135] = 135, + [136] = 136, + [137] = 137, + [138] = 101, + [139] = 139, + [140] = 140, + [141] = 141, + [142] = 142, + [143] = 142, + [144] = 144, + [145] = 145, + [146] = 146, + [147] = 147, + [148] = 147, + [149] = 149, + [150] = 149, + [151] = 151, + [152] = 152, + [153] = 153, + [154] = 154, + [155] = 155, + [156] = 156, + [157] = 157, + [158] = 158, + [159] = 159, + [160] = 155, + [161] = 161, + [162] = 152, + [163] = 163, + [164] = 164, + [165] = 159, + [166] = 161, + [167] = 154, + [168] = 158, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(72); + ADVANCE_MAP( + '!', 2, + '"', 115, + '\'', 112, + '(', 109, + ')', 110, + '*', 75, + '+', 104, + ',', 76, + '-', 105, + '.', 111, + '/', 106, + ';', 73, + '<', 100, + '=', 97, + '>', 102, + 'A', 37, + 'B', 68, + 'D', 9, + 'F', 3, + 'G', 54, + 'H', 4, + 'I', 42, + 'J', 46, + 'L', 10, + 'N', 45, + 'O', 39, + 'R', 25, + 'S', 16, + 'T', 50, + 'W', 23, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + END_STATE(); + case 1: + ADVANCE_MAP( + '"', 115, + '\'', 112, + '(', 109, + ')', 110, + '*', 75, + '-', 105, + 'F', 126, + 'N', 132, + 'T', 133, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(1); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 2: + if (lookahead == '=') ADVANCE(98); + END_STATE(); + case 3: + if (lookahead == 'A') ADVANCE(31); + if (lookahead == 'R') ADVANCE(47); + if (lookahead == 'U') ADVANCE(33); + END_STATE(); + case 4: + if (lookahead == 'A') ADVANCE(67); + END_STATE(); + case 5: + if (lookahead == 'C') ADVANCE(92); + END_STATE(); + case 6: + if (lookahead == 'C') ADVANCE(91); + END_STATE(); + case 7: + if (lookahead == 'C') ADVANCE(62); + END_STATE(); + case 8: + if (lookahead == 'D') ADVANCE(94); + END_STATE(); + case 9: + if (lookahead == 'E') ADVANCE(56); + END_STATE(); + case 10: + if (lookahead == 'E') ADVANCE(20); + if (lookahead == 'I') ADVANCE(36); + END_STATE(); + case 11: + if (lookahead == 'E') ADVANCE(120); + END_STATE(); + case 12: + if (lookahead == 'E') ADVANCE(122); + END_STATE(); + case 13: + if (lookahead == 'E') ADVANCE(86); + END_STATE(); + case 14: + if (lookahead == 'E') ADVANCE(7); + END_STATE(); + case 15: + if (lookahead == 'E') ADVANCE(55); + END_STATE(); + case 16: + if (lookahead == 'E') ADVANCE(32); + END_STATE(); + case 17: + if (lookahead == 'E') ADVANCE(51); + END_STATE(); + case 18: + if (lookahead == 'E') ADVANCE(52); + END_STATE(); + case 19: + if (lookahead == 'E') ADVANCE(53); + END_STATE(); + case 20: + if (lookahead == 'F') ADVANCE(59); + END_STATE(); + case 21: + if (lookahead == 'G') ADVANCE(89); + END_STATE(); + case 22: + if (lookahead == 'G') ADVANCE(24); + END_STATE(); + case 23: + if (lookahead == 'H') ADVANCE(15); + END_STATE(); + case 24: + if (lookahead == 'H') ADVANCE(61); + END_STATE(); + case 25: + if (lookahead == 'I') ADVANCE(22); + END_STATE(); + case 26: + if (lookahead == 'I') ADVANCE(41); + END_STATE(); + case 27: + if (lookahead == 'I') ADVANCE(43); + END_STATE(); + case 28: + if (lookahead == 'I') ADVANCE(60); + END_STATE(); + case 29: + if (lookahead == 'L') ADVANCE(84); + END_STATE(); + case 30: + if (lookahead == 'L') ADVANCE(124); + END_STATE(); + case 31: + if (lookahead == 'L') ADVANCE(57); + END_STATE(); + case 32: + if (lookahead == 'L') ADVANCE(14); + END_STATE(); + case 33: + if (lookahead == 'L') ADVANCE(29); + END_STATE(); + case 34: + if (lookahead == 'L') ADVANCE(30); + END_STATE(); + case 35: + if (lookahead == 'M') ADVANCE(78); + END_STATE(); + case 36: + if (lookahead == 'M') ADVANCE(28); + END_STATE(); + case 37: + if (lookahead == 'N') ADVANCE(8); + if (lookahead == 'S') ADVANCE(77); + END_STATE(); + case 38: + if (lookahead == 'N') ADVANCE(8); + if (lookahead == 'S') ADVANCE(6); + END_STATE(); + case 39: + if (lookahead == 'N') ADVANCE(85); + if (lookahead == 'R') ADVANCE(96); + if (lookahead == 'U') ADVANCE(63); + END_STATE(); + case 40: + if (lookahead == 'N') ADVANCE(85); + if (lookahead == 'R') ADVANCE(95); + END_STATE(); + case 41: + if (lookahead == 'N') ADVANCE(79); + END_STATE(); + case 42: + if (lookahead == 'N') ADVANCE(44); + END_STATE(); + case 43: + if (lookahead == 'N') ADVANCE(21); + END_STATE(); + case 44: + if (lookahead == 'N') ADVANCE(17); + END_STATE(); + case 45: + if (lookahead == 'O') ADVANCE(58); + if (lookahead == 'U') ADVANCE(34); + END_STATE(); + case 46: + if (lookahead == 'O') ADVANCE(26); + END_STATE(); + case 47: + if (lookahead == 'O') ADVANCE(35); + END_STATE(); + case 48: + if (lookahead == 'O') ADVANCE(64); + END_STATE(); + case 49: + if (lookahead == 'P') ADVANCE(87); + END_STATE(); + case 50: + if (lookahead == 'R') ADVANCE(66); + END_STATE(); + case 51: + if (lookahead == 'R') ADVANCE(83); + END_STATE(); + case 52: + if (lookahead == 'R') ADVANCE(90); + END_STATE(); + case 53: + if (lookahead == 'R') ADVANCE(81); + END_STATE(); + case 54: + if (lookahead == 'R') ADVANCE(48); + END_STATE(); + case 55: + if (lookahead == 'R') ADVANCE(13); + END_STATE(); + case 56: + if (lookahead == 'S') ADVANCE(5); + END_STATE(); + case 57: + if (lookahead == 'S') ADVANCE(12); + END_STATE(); + case 58: + if (lookahead == 'T') ADVANCE(107); + END_STATE(); + case 59: + if (lookahead == 'T') ADVANCE(80); + END_STATE(); + case 60: + if (lookahead == 'T') ADVANCE(93); + END_STATE(); + case 61: + if (lookahead == 'T') ADVANCE(82); + END_STATE(); + case 62: + if (lookahead == 'T') ADVANCE(74); + END_STATE(); + case 63: + if (lookahead == 'T') ADVANCE(19); + END_STATE(); + case 64: + if (lookahead == 'U') ADVANCE(49); + END_STATE(); + case 65: + if (lookahead == 'U') ADVANCE(33); + END_STATE(); + case 66: + if (lookahead == 'U') ADVANCE(11); + END_STATE(); + case 67: + if (lookahead == 'V') ADVANCE(27); + END_STATE(); + case 68: + if (lookahead == 'Y') ADVANCE(88); + END_STATE(); + case 69: + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(69); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 70: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(119); + END_STATE(); + case 71: + if (eof) ADVANCE(72); + ADVANCE_MAP( + '!', 2, + '(', 109, + ')', 110, + '*', 75, + '+', 104, + ',', 76, + '-', 105, + '.', 111, + '/', 106, + ';', 73, + '<', 100, + '=', 97, + '>', 102, + 'A', 38, + 'D', 9, + 'F', 65, + 'I', 42, + 'J', 46, + 'L', 10, + 'O', 40, + 'R', 25, + 'S', 16, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(71); + END_STATE(); + case 72: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 73: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 74: + ACCEPT_TOKEN(anon_sym_SELECT); + END_STATE(); + case 75: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 76: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 77: + ACCEPT_TOKEN(anon_sym_AS); + END_STATE(); + case 78: + ACCEPT_TOKEN(anon_sym_FROM); + END_STATE(); + case 79: + ACCEPT_TOKEN(anon_sym_JOIN); + END_STATE(); + case 80: + ACCEPT_TOKEN(anon_sym_LEFT); + END_STATE(); + case 81: + ACCEPT_TOKEN(anon_sym_OUTER); + END_STATE(); + case 82: + ACCEPT_TOKEN(anon_sym_RIGHT); + END_STATE(); + case 83: + ACCEPT_TOKEN(anon_sym_INNER); + END_STATE(); + case 84: + ACCEPT_TOKEN(anon_sym_FULL); + END_STATE(); + case 85: + ACCEPT_TOKEN(anon_sym_ON); + END_STATE(); + case 86: + ACCEPT_TOKEN(anon_sym_WHERE); + END_STATE(); + case 87: + ACCEPT_TOKEN(anon_sym_GROUP); + END_STATE(); + case 88: + ACCEPT_TOKEN(anon_sym_BY); + END_STATE(); + case 89: + ACCEPT_TOKEN(anon_sym_HAVING); + END_STATE(); + case 90: + ACCEPT_TOKEN(anon_sym_ORDER); + END_STATE(); + case 91: + ACCEPT_TOKEN(anon_sym_ASC); + END_STATE(); + case 92: + ACCEPT_TOKEN(anon_sym_DESC); + END_STATE(); + case 93: + ACCEPT_TOKEN(anon_sym_LIMIT); + END_STATE(); + case 94: + ACCEPT_TOKEN(anon_sym_AND); + END_STATE(); + case 95: + ACCEPT_TOKEN(anon_sym_OR); + END_STATE(); + case 96: + ACCEPT_TOKEN(anon_sym_OR); + if (lookahead == 'D') ADVANCE(18); + END_STATE(); + case 97: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 98: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 99: + ACCEPT_TOKEN(anon_sym_LT_GT); + END_STATE(); + case 100: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '=') ADVANCE(101); + if (lookahead == '>') ADVANCE(99); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(103); + END_STATE(); + case 103: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 105: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_SLASH); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_NOT); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_NOT); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 111: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 112: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 113: + ACCEPT_TOKEN(aux_sym_string_token1); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(113); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(114); + END_STATE(); + case 114: + ACCEPT_TOKEN(aux_sym_string_token1); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(114); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 116: + ACCEPT_TOKEN(aux_sym_string_token2); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(116); + if (lookahead != 0 && + lookahead != '"') ADVANCE(117); + END_STATE(); + case 117: + ACCEPT_TOKEN(aux_sym_string_token2); + if (lookahead != 0 && + lookahead != '"') ADVANCE(117); + END_STATE(); + case 118: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(70); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + END_STATE(); + case 119: + ACCEPT_TOKEN(sym_number); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(119); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_TRUE); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_TRUE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_FALSE); + END_STATE(); + case 123: + ACCEPT_TOKEN(anon_sym_FALSE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 124: + ACCEPT_TOKEN(sym_null); + END_STATE(); + case 125: + ACCEPT_TOKEN(sym_null); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 126: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'A') ADVANCE(129); + if (('0' <= lookahead && lookahead <= '9') || + ('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 127: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(121); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 128: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(123); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 129: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(134); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 130: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(125); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 131: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(130); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 132: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(135); + if (lookahead == 'U') ADVANCE(131); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 133: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(136); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 134: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'S') ADVANCE(128); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 135: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(108); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 136: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'U') ADVANCE(127); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + case 137: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 0}, + [3] = {.lex_state = 0}, + [4] = {.lex_state = 71}, + [5] = {.lex_state = 0}, + [6] = {.lex_state = 0}, + [7] = {.lex_state = 0}, + [8] = {.lex_state = 0}, + [9] = {.lex_state = 0}, + [10] = {.lex_state = 0}, + [11] = {.lex_state = 0}, + [12] = {.lex_state = 0}, + [13] = {.lex_state = 0}, + [14] = {.lex_state = 0}, + [15] = {.lex_state = 0}, + [16] = {.lex_state = 0}, + [17] = {.lex_state = 0}, + [18] = {.lex_state = 71}, + [19] = {.lex_state = 0}, + [20] = {.lex_state = 0}, + [21] = {.lex_state = 0}, + [22] = {.lex_state = 71}, + [23] = {.lex_state = 71}, + [24] = {.lex_state = 71}, + [25] = {.lex_state = 71}, + [26] = {.lex_state = 71}, + [27] = {.lex_state = 71}, + [28] = {.lex_state = 71}, + [29] = {.lex_state = 71}, + [30] = {.lex_state = 71}, + [31] = {.lex_state = 71}, + [32] = {.lex_state = 71}, + [33] = {.lex_state = 71}, + [34] = {.lex_state = 71}, + [35] = {.lex_state = 0}, + [36] = {.lex_state = 0}, + [37] = {.lex_state = 1}, + [38] = {.lex_state = 0}, + [39] = {.lex_state = 1}, + [40] = {.lex_state = 1}, + [41] = {.lex_state = 1}, + [42] = {.lex_state = 0}, + [43] = {.lex_state = 1}, + [44] = {.lex_state = 71}, + [45] = {.lex_state = 0}, + [46] = {.lex_state = 1}, + [47] = {.lex_state = 1}, + [48] = {.lex_state = 1}, + [49] = {.lex_state = 1}, + [50] = {.lex_state = 1}, + [51] = {.lex_state = 1}, + [52] = {.lex_state = 1}, + [53] = {.lex_state = 1}, + [54] = {.lex_state = 1}, + [55] = {.lex_state = 1}, + [56] = {.lex_state = 1}, + [57] = {.lex_state = 1}, + [58] = {.lex_state = 1}, + [59] = {.lex_state = 1}, + [60] = {.lex_state = 1}, + [61] = {.lex_state = 1}, + [62] = {.lex_state = 1}, + [63] = {.lex_state = 1}, + [64] = {.lex_state = 1}, + [65] = {.lex_state = 1}, + [66] = {.lex_state = 71}, + [67] = {.lex_state = 1}, + [68] = {.lex_state = 71}, + [69] = {.lex_state = 1}, + [70] = {.lex_state = 71}, + [71] = {.lex_state = 1}, + [72] = {.lex_state = 1}, + [73] = {.lex_state = 1}, + [74] = {.lex_state = 1}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 71}, + [77] = {.lex_state = 0}, + [78] = {.lex_state = 71}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 71}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 71}, + [87] = {.lex_state = 71}, + [88] = {.lex_state = 0}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 0}, + [91] = {.lex_state = 0}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 0}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 0}, + [96] = {.lex_state = 0}, + [97] = {.lex_state = 0}, + [98] = {.lex_state = 0}, + [99] = {.lex_state = 0}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 0}, + [103] = {.lex_state = 0}, + [104] = {.lex_state = 0}, + [105] = {.lex_state = 0}, + [106] = {.lex_state = 0}, + [107] = {.lex_state = 0}, + [108] = {.lex_state = 0}, + [109] = {.lex_state = 0}, + [110] = {.lex_state = 0}, + [111] = {.lex_state = 0}, + [112] = {.lex_state = 0}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 0}, + [115] = {.lex_state = 0}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 0}, + [118] = {.lex_state = 0}, + [119] = {.lex_state = 0}, + [120] = {.lex_state = 0}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 0}, + [123] = {.lex_state = 0}, + [124] = {.lex_state = 0}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 69}, + [128] = {.lex_state = 69}, + [129] = {.lex_state = 69}, + [130] = {.lex_state = 69}, + [131] = {.lex_state = 69}, + [132] = {.lex_state = 69}, + [133] = {.lex_state = 69}, + [134] = {.lex_state = 69}, + [135] = {.lex_state = 0}, + [136] = {.lex_state = 0}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 0}, + [141] = {.lex_state = 0}, + [142] = {.lex_state = 0}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 0}, + [150] = {.lex_state = 0}, + [151] = {.lex_state = 69}, + [152] = {.lex_state = 69}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0}, + [155] = {.lex_state = 116}, + [156] = {.lex_state = 0}, + [157] = {.lex_state = 0}, + [158] = {.lex_state = 0}, + [159] = {.lex_state = 113}, + [160] = {.lex_state = 116}, + [161] = {.lex_state = 0}, + [162] = {.lex_state = 69}, + [163] = {.lex_state = 0}, + [164] = {.lex_state = 69}, + [165] = {.lex_state = 113}, + [166] = {.lex_state = 0}, + [167] = {.lex_state = 0}, + [168] = {.lex_state = 0}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_SELECT] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_AS] = ACTIONS(1), + [anon_sym_FROM] = ACTIONS(1), + [anon_sym_JOIN] = ACTIONS(1), + [anon_sym_LEFT] = ACTIONS(1), + [anon_sym_OUTER] = ACTIONS(1), + [anon_sym_RIGHT] = ACTIONS(1), + [anon_sym_INNER] = ACTIONS(1), + [anon_sym_FULL] = ACTIONS(1), + [anon_sym_ON] = ACTIONS(1), + [anon_sym_WHERE] = ACTIONS(1), + [anon_sym_GROUP] = ACTIONS(1), + [anon_sym_BY] = ACTIONS(1), + [anon_sym_HAVING] = ACTIONS(1), + [anon_sym_ORDER] = ACTIONS(1), + [anon_sym_DESC] = ACTIONS(1), + [anon_sym_LIMIT] = ACTIONS(1), + [anon_sym_AND] = ACTIONS(1), + [anon_sym_OR] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_LT_GT] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_NOT] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_SQUOTE] = ACTIONS(1), + [anon_sym_DQUOTE] = ACTIONS(1), + [sym_number] = ACTIONS(1), + [anon_sym_TRUE] = ACTIONS(1), + [anon_sym_FALSE] = ACTIONS(1), + [sym_null] = ACTIONS(1), + }, + [1] = { + [sym_source_file] = STATE(153), + [sym__statement] = STATE(124), + [sym_select_statement] = STATE(135), + [aux_sym_source_file_repeat1] = STATE(124), + [ts_builtin_sym_end] = ACTIONS(3), + [anon_sym_SELECT] = ACTIONS(5), + }, +}; + +static const uint16_t ts_small_parse_table[] = { + [0] = 4, + ACTIONS(11), 1, + anon_sym_LPAREN, + ACTIONS(13), 1, + anon_sym_DOT, + ACTIONS(9), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(7), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [40] = 2, + ACTIONS(17), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(15), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [74] = 4, + ACTIONS(19), 1, + anon_sym_LPAREN, + ACTIONS(21), 1, + anon_sym_DOT, + ACTIONS(9), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(7), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [112] = 2, + ACTIONS(25), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(23), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [146] = 2, + ACTIONS(29), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(27), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [180] = 2, + ACTIONS(33), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(31), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [214] = 2, + ACTIONS(37), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(35), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [248] = 2, + ACTIONS(41), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(39), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [282] = 2, + ACTIONS(45), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [316] = 6, + ACTIONS(45), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(43), 17, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + [358] = 7, + ACTIONS(45), 1, + anon_sym_OR, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(43), 16, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [402] = 4, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(45), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 22, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [440] = 3, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(45), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 24, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + [476] = 2, + ACTIONS(59), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(57), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [510] = 2, + ACTIONS(63), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(61), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [544] = 2, + ACTIONS(67), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(65), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_AS, + anon_sym_FROM, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [578] = 2, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(65), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [610] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(69), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [652] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(73), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [694] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(75), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [736] = 2, + ACTIONS(17), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(15), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [768] = 2, + ACTIONS(25), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(23), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [800] = 2, + ACTIONS(29), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(27), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [832] = 2, + ACTIONS(33), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(31), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [864] = 2, + ACTIONS(37), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(35), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [896] = 2, + ACTIONS(41), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(39), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [928] = 2, + ACTIONS(45), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [960] = 5, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(43), 16, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_RPAREN, + [998] = 6, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(43), 15, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_OR, + anon_sym_RPAREN, + [1038] = 4, + ACTIONS(45), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(43), 21, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_RPAREN, + [1074] = 3, + ACTIONS(45), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(43), 23, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_RPAREN, + [1108] = 2, + ACTIONS(59), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(57), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [1140] = 2, + ACTIONS(63), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(61), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_AND, + anon_sym_OR, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_RPAREN, + [1172] = 8, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(89), 1, + anon_sym_AS, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(87), 10, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [1213] = 3, + ACTIONS(93), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(87), 10, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + ACTIONS(91), 11, + anon_sym_STAR, + anon_sym_AS, + anon_sym_AND, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + [1244] = 15, + ACTIONS(95), 1, + anon_sym_STAR, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + STATE(36), 1, + sym_column_reference, + STATE(82), 1, + sym__select_elements, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(93), 2, + sym__select_element, + sym_alias, + STATE(35), 6, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_literal, + [1298] = 9, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(117), 1, + anon_sym_COMMA, + STATE(102), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(115), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [1338] = 13, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + STATE(36), 1, + sym_column_reference, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(95), 2, + sym__select_element, + sym_alias, + STATE(35), 6, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_literal, + [1386] = 12, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(125), 1, + anon_sym_RPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(78), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1431] = 12, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + STATE(117), 1, + sym_order_by_element, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(44), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1476] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(139), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [1511] = 12, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + STATE(121), 1, + sym_order_by_element, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(44), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1556] = 8, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(143), 2, + anon_sym_ASC, + anon_sym_DESC, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(141), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_LIMIT, + [1593] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(147), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [1628] = 12, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(149), 1, + anon_sym_RPAREN, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(76), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1673] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(70), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1715] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(87), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1757] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(12), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1799] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(13), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1841] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(14), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1883] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(21), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1925] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(20), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [1967] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(86), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2009] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(19), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2051] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(42), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2093] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(75), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2135] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(28), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2177] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(29), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2219] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(30), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2261] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(31), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2303] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(32), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2345] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(38), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2387] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(45), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2429] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(66), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2471] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(75), 6, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [2505] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(68), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2547] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(73), 6, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [2581] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(10), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2623] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(69), 6, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [2657] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(23), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2699] = 11, + ACTIONS(119), 1, + anon_sym_DASH, + ACTIONS(121), 1, + anon_sym_NOT, + ACTIONS(123), 1, + anon_sym_LPAREN, + ACTIONS(127), 1, + anon_sym_SQUOTE, + ACTIONS(129), 1, + anon_sym_DQUOTE, + ACTIONS(131), 1, + sym_number, + ACTIONS(135), 1, + sym_null, + ACTIONS(137), 1, + sym_identifier, + ACTIONS(133), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(22), 2, + sym_string, + sym_boolean, + STATE(81), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2741] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(5), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2783] = 11, + ACTIONS(97), 1, + anon_sym_DASH, + ACTIONS(99), 1, + anon_sym_NOT, + ACTIONS(101), 1, + anon_sym_LPAREN, + ACTIONS(103), 1, + anon_sym_SQUOTE, + ACTIONS(105), 1, + anon_sym_DQUOTE, + ACTIONS(107), 1, + sym_number, + ACTIONS(111), 1, + sym_null, + ACTIONS(113), 1, + sym_identifier, + ACTIONS(109), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 2, + sym_string, + sym_boolean, + STATE(11), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2825] = 7, + ACTIONS(55), 1, + anon_sym_AND, + ACTIONS(71), 1, + anon_sym_OR, + ACTIONS(47), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(51), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(53), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(49), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(151), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_ORDER, + anon_sym_LIMIT, + [2858] = 9, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(153), 1, + anon_sym_COMMA, + ACTIONS(155), 1, + anon_sym_RPAREN, + STATE(143), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [2893] = 7, + ACTIONS(159), 1, + anon_sym_COMMA, + ACTIONS(161), 1, + anon_sym_JOIN, + ACTIONS(165), 1, + anon_sym_INNER, + STATE(80), 1, + aux_sym_join_clause_repeat1, + STATE(94), 1, + aux_sym__from_clause_repeat1, + ACTIONS(163), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + ACTIONS(157), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [2924] = 9, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(153), 1, + anon_sym_COMMA, + ACTIONS(167), 1, + anon_sym_RPAREN, + STATE(142), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [2959] = 2, + ACTIONS(171), 1, + anon_sym_DOT, + ACTIONS(169), 15, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [2980] = 2, + STATE(84), 1, + aux_sym_join_clause_repeat1, + ACTIONS(173), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3000] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(147), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [3030] = 13, + ACTIONS(177), 1, + anon_sym_FROM, + ACTIONS(179), 1, + anon_sym_WHERE, + ACTIONS(181), 1, + anon_sym_GROUP, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(88), 1, + sym__from_clause, + STATE(91), 1, + sym__where_clause, + STATE(99), 1, + sym__group_by_clause, + STATE(107), 1, + sym__having_clause, + STATE(119), 1, + sym__order_by_clause, + STATE(140), 1, + sym__limit_clause, + ACTIONS(175), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3072] = 1, + ACTIONS(189), 15, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3090] = 5, + ACTIONS(193), 1, + anon_sym_JOIN, + ACTIONS(199), 1, + anon_sym_INNER, + STATE(84), 1, + aux_sym_join_clause_repeat1, + ACTIONS(196), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + ACTIONS(191), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3116] = 5, + ACTIONS(161), 1, + anon_sym_JOIN, + ACTIONS(165), 1, + anon_sym_INNER, + STATE(80), 1, + aux_sym_join_clause_repeat1, + ACTIONS(163), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + ACTIONS(202), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3142] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(204), 1, + anon_sym_RPAREN, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [3171] = 7, + ACTIONS(85), 1, + anon_sym_AND, + ACTIONS(145), 1, + anon_sym_OR, + ACTIONS(206), 1, + anon_sym_RPAREN, + ACTIONS(77), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(83), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(79), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + [3200] = 11, + ACTIONS(179), 1, + anon_sym_WHERE, + ACTIONS(181), 1, + anon_sym_GROUP, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(90), 1, + sym__where_clause, + STATE(98), 1, + sym__group_by_clause, + STATE(111), 1, + sym__having_clause, + STATE(123), 1, + sym__order_by_clause, + STATE(145), 1, + sym__limit_clause, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3236] = 3, + ACTIONS(212), 1, + anon_sym_COMMA, + STATE(89), 1, + aux_sym__select_elements_repeat1, + ACTIONS(210), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3254] = 9, + ACTIONS(181), 1, + anon_sym_GROUP, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(100), 1, + sym__group_by_clause, + STATE(109), 1, + sym__having_clause, + STATE(122), 1, + sym__order_by_clause, + STATE(139), 1, + sym__limit_clause, + ACTIONS(215), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3284] = 9, + ACTIONS(181), 1, + anon_sym_GROUP, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(98), 1, + sym__group_by_clause, + STATE(111), 1, + sym__having_clause, + STATE(123), 1, + sym__order_by_clause, + STATE(145), 1, + sym__limit_clause, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3314] = 3, + ACTIONS(219), 1, + anon_sym_COMMA, + STATE(89), 1, + aux_sym__select_elements_repeat1, + ACTIONS(217), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3332] = 3, + ACTIONS(219), 1, + anon_sym_COMMA, + STATE(92), 1, + aux_sym__select_elements_repeat1, + ACTIONS(221), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3350] = 3, + ACTIONS(159), 1, + anon_sym_COMMA, + STATE(97), 1, + aux_sym__from_clause_repeat1, + ACTIONS(223), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3367] = 1, + ACTIONS(210), 10, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3380] = 1, + ACTIONS(225), 10, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3393] = 3, + ACTIONS(227), 1, + anon_sym_COMMA, + STATE(97), 1, + aux_sym__from_clause_repeat1, + ACTIONS(202), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3410] = 7, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(109), 1, + sym__having_clause, + STATE(122), 1, + sym__order_by_clause, + STATE(139), 1, + sym__limit_clause, + ACTIONS(215), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3434] = 7, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(111), 1, + sym__having_clause, + STATE(123), 1, + sym__order_by_clause, + STATE(145), 1, + sym__limit_clause, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3458] = 7, + ACTIONS(183), 1, + anon_sym_HAVING, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(113), 1, + sym__having_clause, + STATE(118), 1, + sym__order_by_clause, + STATE(144), 1, + sym__limit_clause, + ACTIONS(230), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3482] = 3, + ACTIONS(232), 1, + anon_sym_COMMA, + STATE(101), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(147), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3497] = 3, + ACTIONS(117), 1, + anon_sym_COMMA, + STATE(101), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(235), 6, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + [3512] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(243), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3530] = 2, + STATE(114), 1, + aux_sym_join_clause_repeat1, + ACTIONS(173), 6, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [3542] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(245), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3560] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(247), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3578] = 5, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(123), 1, + sym__order_by_clause, + STATE(145), 1, + sym__limit_clause, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3596] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(249), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3614] = 5, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(118), 1, + sym__order_by_clause, + STATE(144), 1, + sym__limit_clause, + ACTIONS(230), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3632] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(251), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3650] = 5, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(122), 1, + sym__order_by_clause, + STATE(139), 1, + sym__limit_clause, + ACTIONS(215), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3668] = 5, + ACTIONS(237), 1, + anon_sym_JOIN, + ACTIONS(241), 1, + anon_sym_INNER, + ACTIONS(253), 1, + anon_sym_ON, + STATE(104), 1, + aux_sym_join_clause_repeat1, + ACTIONS(239), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3686] = 5, + ACTIONS(185), 1, + anon_sym_ORDER, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(120), 1, + sym__order_by_clause, + STATE(136), 1, + sym__limit_clause, + ACTIONS(255), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3704] = 5, + ACTIONS(191), 1, + anon_sym_ON, + ACTIONS(257), 1, + anon_sym_JOIN, + ACTIONS(263), 1, + anon_sym_INNER, + STATE(114), 1, + aux_sym_join_clause_repeat1, + ACTIONS(260), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [3722] = 3, + ACTIONS(268), 1, + anon_sym_COMMA, + STATE(115), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(266), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_LIMIT, + [3735] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + STATE(115), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(271), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_LIMIT, + [3748] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + STATE(116), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(275), 4, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_LIMIT, + [3761] = 3, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(136), 1, + sym__limit_clause, + ACTIONS(255), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3773] = 3, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(145), 1, + sym__limit_clause, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3785] = 3, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(141), 1, + sym__limit_clause, + ACTIONS(277), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3797] = 1, + ACTIONS(266), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_LIMIT, + [3805] = 3, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(144), 1, + sym__limit_clause, + ACTIONS(230), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3817] = 3, + ACTIONS(187), 1, + anon_sym_LIMIT, + STATE(139), 1, + sym__limit_clause, + ACTIONS(215), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3829] = 4, + ACTIONS(5), 1, + anon_sym_SELECT, + ACTIONS(279), 1, + ts_builtin_sym_end, + STATE(135), 1, + sym_select_statement, + STATE(126), 2, + sym__statement, + aux_sym_source_file_repeat1, + [3843] = 1, + ACTIONS(281), 5, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_LIMIT, + [3851] = 4, + ACTIONS(283), 1, + ts_builtin_sym_end, + ACTIONS(285), 1, + anon_sym_SELECT, + STATE(135), 1, + sym_select_statement, + STATE(126), 2, + sym__statement, + aux_sym_source_file_repeat1, + [3865] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(106), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3874] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(77), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3883] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(105), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3892] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(112), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3901] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(110), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3910] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(85), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3919] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(103), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3928] = 2, + ACTIONS(288), 1, + sym_identifier, + STATE(108), 3, + sym__table_reference, + sym_join_clause, + sym_table_name, + [3937] = 2, + ACTIONS(292), 1, + anon_sym_SEMI, + ACTIONS(290), 2, + ts_builtin_sym_end, + anon_sym_SELECT, + [3945] = 1, + ACTIONS(277), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3951] = 1, + ACTIONS(294), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3957] = 3, + ACTIONS(147), 1, + anon_sym_RPAREN, + ACTIONS(296), 1, + anon_sym_COMMA, + STATE(138), 1, + aux_sym__group_by_clause_repeat1, + [3967] = 1, + ACTIONS(230), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3973] = 1, + ACTIONS(208), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3979] = 1, + ACTIONS(299), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [3985] = 3, + ACTIONS(153), 1, + anon_sym_COMMA, + ACTIONS(301), 1, + anon_sym_RPAREN, + STATE(138), 1, + aux_sym__group_by_clause_repeat1, + [3995] = 3, + ACTIONS(153), 1, + anon_sym_COMMA, + ACTIONS(303), 1, + anon_sym_RPAREN, + STATE(138), 1, + aux_sym__group_by_clause_repeat1, + [4005] = 1, + ACTIONS(255), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [4011] = 1, + ACTIONS(215), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + [4017] = 1, + ACTIONS(305), 2, + ts_builtin_sym_end, + anon_sym_SELECT, + [4022] = 2, + ACTIONS(307), 1, + anon_sym_JOIN, + ACTIONS(309), 1, + anon_sym_OUTER, + [4029] = 2, + ACTIONS(311), 1, + anon_sym_JOIN, + ACTIONS(313), 1, + anon_sym_OUTER, + [4036] = 1, + ACTIONS(315), 1, + anon_sym_DQUOTE, + [4040] = 1, + ACTIONS(317), 1, + anon_sym_DQUOTE, + [4044] = 1, + ACTIONS(319), 1, + sym_identifier, + [4048] = 1, + ACTIONS(321), 1, + sym_identifier, + [4052] = 1, + ACTIONS(323), 1, + ts_builtin_sym_end, + [4056] = 1, + ACTIONS(315), 1, + anon_sym_SQUOTE, + [4060] = 1, + ACTIONS(325), 1, + aux_sym_string_token2, + [4064] = 1, + ACTIONS(327), 1, + anon_sym_BY, + [4068] = 1, + ACTIONS(329), 1, + sym_number, + [4072] = 1, + ACTIONS(331), 1, + anon_sym_JOIN, + [4076] = 1, + ACTIONS(333), 1, + aux_sym_string_token1, + [4080] = 1, + ACTIONS(335), 1, + aux_sym_string_token2, + [4084] = 1, + ACTIONS(307), 1, + anon_sym_JOIN, + [4088] = 1, + ACTIONS(337), 1, + sym_identifier, + [4092] = 1, + ACTIONS(339), 1, + anon_sym_BY, + [4096] = 1, + ACTIONS(341), 1, + sym_identifier, + [4100] = 1, + ACTIONS(343), 1, + aux_sym_string_token1, + [4104] = 1, + ACTIONS(311), 1, + anon_sym_JOIN, + [4108] = 1, + ACTIONS(317), 1, + anon_sym_SQUOTE, + [4112] = 1, + ACTIONS(345), 1, + anon_sym_JOIN, +}; + +static const uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 40, + [SMALL_STATE(4)] = 74, + [SMALL_STATE(5)] = 112, + [SMALL_STATE(6)] = 146, + [SMALL_STATE(7)] = 180, + [SMALL_STATE(8)] = 214, + [SMALL_STATE(9)] = 248, + [SMALL_STATE(10)] = 282, + [SMALL_STATE(11)] = 316, + [SMALL_STATE(12)] = 358, + [SMALL_STATE(13)] = 402, + [SMALL_STATE(14)] = 440, + [SMALL_STATE(15)] = 476, + [SMALL_STATE(16)] = 510, + [SMALL_STATE(17)] = 544, + [SMALL_STATE(18)] = 578, + [SMALL_STATE(19)] = 610, + [SMALL_STATE(20)] = 652, + [SMALL_STATE(21)] = 694, + [SMALL_STATE(22)] = 736, + [SMALL_STATE(23)] = 768, + [SMALL_STATE(24)] = 800, + [SMALL_STATE(25)] = 832, + [SMALL_STATE(26)] = 864, + [SMALL_STATE(27)] = 896, + [SMALL_STATE(28)] = 928, + [SMALL_STATE(29)] = 960, + [SMALL_STATE(30)] = 998, + [SMALL_STATE(31)] = 1038, + [SMALL_STATE(32)] = 1074, + [SMALL_STATE(33)] = 1108, + [SMALL_STATE(34)] = 1140, + [SMALL_STATE(35)] = 1172, + [SMALL_STATE(36)] = 1213, + [SMALL_STATE(37)] = 1244, + [SMALL_STATE(38)] = 1298, + [SMALL_STATE(39)] = 1338, + [SMALL_STATE(40)] = 1386, + [SMALL_STATE(41)] = 1431, + [SMALL_STATE(42)] = 1476, + [SMALL_STATE(43)] = 1511, + [SMALL_STATE(44)] = 1556, + [SMALL_STATE(45)] = 1593, + [SMALL_STATE(46)] = 1628, + [SMALL_STATE(47)] = 1673, + [SMALL_STATE(48)] = 1715, + [SMALL_STATE(49)] = 1757, + [SMALL_STATE(50)] = 1799, + [SMALL_STATE(51)] = 1841, + [SMALL_STATE(52)] = 1883, + [SMALL_STATE(53)] = 1925, + [SMALL_STATE(54)] = 1967, + [SMALL_STATE(55)] = 2009, + [SMALL_STATE(56)] = 2051, + [SMALL_STATE(57)] = 2093, + [SMALL_STATE(58)] = 2135, + [SMALL_STATE(59)] = 2177, + [SMALL_STATE(60)] = 2219, + [SMALL_STATE(61)] = 2261, + [SMALL_STATE(62)] = 2303, + [SMALL_STATE(63)] = 2345, + [SMALL_STATE(64)] = 2387, + [SMALL_STATE(65)] = 2429, + [SMALL_STATE(66)] = 2471, + [SMALL_STATE(67)] = 2505, + [SMALL_STATE(68)] = 2547, + [SMALL_STATE(69)] = 2581, + [SMALL_STATE(70)] = 2623, + [SMALL_STATE(71)] = 2657, + [SMALL_STATE(72)] = 2699, + [SMALL_STATE(73)] = 2741, + [SMALL_STATE(74)] = 2783, + [SMALL_STATE(75)] = 2825, + [SMALL_STATE(76)] = 2858, + [SMALL_STATE(77)] = 2893, + [SMALL_STATE(78)] = 2924, + [SMALL_STATE(79)] = 2959, + [SMALL_STATE(80)] = 2980, + [SMALL_STATE(81)] = 3000, + [SMALL_STATE(82)] = 3030, + [SMALL_STATE(83)] = 3072, + [SMALL_STATE(84)] = 3090, + [SMALL_STATE(85)] = 3116, + [SMALL_STATE(86)] = 3142, + [SMALL_STATE(87)] = 3171, + [SMALL_STATE(88)] = 3200, + [SMALL_STATE(89)] = 3236, + [SMALL_STATE(90)] = 3254, + [SMALL_STATE(91)] = 3284, + [SMALL_STATE(92)] = 3314, + [SMALL_STATE(93)] = 3332, + [SMALL_STATE(94)] = 3350, + [SMALL_STATE(95)] = 3367, + [SMALL_STATE(96)] = 3380, + [SMALL_STATE(97)] = 3393, + [SMALL_STATE(98)] = 3410, + [SMALL_STATE(99)] = 3434, + [SMALL_STATE(100)] = 3458, + [SMALL_STATE(101)] = 3482, + [SMALL_STATE(102)] = 3497, + [SMALL_STATE(103)] = 3512, + [SMALL_STATE(104)] = 3530, + [SMALL_STATE(105)] = 3542, + [SMALL_STATE(106)] = 3560, + [SMALL_STATE(107)] = 3578, + [SMALL_STATE(108)] = 3596, + [SMALL_STATE(109)] = 3614, + [SMALL_STATE(110)] = 3632, + [SMALL_STATE(111)] = 3650, + [SMALL_STATE(112)] = 3668, + [SMALL_STATE(113)] = 3686, + [SMALL_STATE(114)] = 3704, + [SMALL_STATE(115)] = 3722, + [SMALL_STATE(116)] = 3735, + [SMALL_STATE(117)] = 3748, + [SMALL_STATE(118)] = 3761, + [SMALL_STATE(119)] = 3773, + [SMALL_STATE(120)] = 3785, + [SMALL_STATE(121)] = 3797, + [SMALL_STATE(122)] = 3805, + [SMALL_STATE(123)] = 3817, + [SMALL_STATE(124)] = 3829, + [SMALL_STATE(125)] = 3843, + [SMALL_STATE(126)] = 3851, + [SMALL_STATE(127)] = 3865, + [SMALL_STATE(128)] = 3874, + [SMALL_STATE(129)] = 3883, + [SMALL_STATE(130)] = 3892, + [SMALL_STATE(131)] = 3901, + [SMALL_STATE(132)] = 3910, + [SMALL_STATE(133)] = 3919, + [SMALL_STATE(134)] = 3928, + [SMALL_STATE(135)] = 3937, + [SMALL_STATE(136)] = 3945, + [SMALL_STATE(137)] = 3951, + [SMALL_STATE(138)] = 3957, + [SMALL_STATE(139)] = 3967, + [SMALL_STATE(140)] = 3973, + [SMALL_STATE(141)] = 3979, + [SMALL_STATE(142)] = 3985, + [SMALL_STATE(143)] = 3995, + [SMALL_STATE(144)] = 4005, + [SMALL_STATE(145)] = 4011, + [SMALL_STATE(146)] = 4017, + [SMALL_STATE(147)] = 4022, + [SMALL_STATE(148)] = 4029, + [SMALL_STATE(149)] = 4036, + [SMALL_STATE(150)] = 4040, + [SMALL_STATE(151)] = 4044, + [SMALL_STATE(152)] = 4048, + [SMALL_STATE(153)] = 4052, + [SMALL_STATE(154)] = 4056, + [SMALL_STATE(155)] = 4060, + [SMALL_STATE(156)] = 4064, + [SMALL_STATE(157)] = 4068, + [SMALL_STATE(158)] = 4072, + [SMALL_STATE(159)] = 4076, + [SMALL_STATE(160)] = 4080, + [SMALL_STATE(161)] = 4084, + [SMALL_STATE(162)] = 4088, + [SMALL_STATE(163)] = 4092, + [SMALL_STATE(164)] = 4096, + [SMALL_STATE(165)] = 4100, + [SMALL_STATE(166)] = 4104, + [SMALL_STATE(167)] = 4108, + [SMALL_STATE(168)] = 4112, +}; + +static const TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 1, 0, 0), + [9] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 1, 0, 0), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(162), + [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1, 0, 0), + [17] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1, 0, 0), + [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), + [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 0), + [25] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 0), + [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [29] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, 0, 0), + [33] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, 0, 0), + [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, 0, 0), + [37] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, 0, 0), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 3, 0, 0), + [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 3, 0, 0), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 0), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 0), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), + [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, 0, 0), + [59] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, 0, 0), + [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, 0, 0), + [63] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, 0, 0), + [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), + [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), + [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 6, 0, 0), + [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 5, 0, 0), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 4, 0, 0), + [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), + [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 1, 0, 0), + [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), + [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression, 1, 0, 0), + [93] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression, 1, 0, 0), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), + [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), + [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), + [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), + [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 3, 0, 0), + [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), + [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [133] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [135] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), + [137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__where_clause, 2, 0, 0), + [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 1, 0, 0), + [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), + [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__having_clause, 2, 0, 0), + [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), + [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 2, 0, 0), + [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), + [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), + [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), + [167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), + [169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 1, 0, 0), + [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(151), + [173] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_clause, 2, 0, 0), + [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 2, 0, 0), + [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), + [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), + [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 3, 0, 0), + [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), + [193] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(131), + [196] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(147), + [199] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(161), + [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), + [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [206] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 3, 0, 0), + [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), + [212] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), SHIFT_REPEAT(39), + [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 4, 0, 0), + [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 2, 0, 0), + [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 1, 0, 0), + [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 3, 0, 0), + [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias, 3, 0, 0), + [227] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(132), + [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 5, 0, 0), + [232] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(64), + [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 4, 0, 0), + [237] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), + [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), + [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), + [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), + [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 6, 0, 0), + [257] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(133), + [260] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(148), + [263] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(166), + [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), + [268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(43), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 4, 0, 0), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 3, 0, 0), + [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 7, 0, 0), + [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 2, 0, 0), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [285] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), + [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), + [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 1, 0, 0), + [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), + [294] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__limit_clause, 2, 0, 0), + [296] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(72), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 8, 0, 0), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 2, 0, 0), + [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), + [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), + [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [323] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), + [333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), + [335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), + [337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), + [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), +}; + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) +#endif + +TS_PUBLIC const TSLanguage *tree_sitter_base_sql(void) { + static const TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .state_count = STATE_COUNT, + .large_state_count = LARGE_STATE_COUNT, + .production_id_count = PRODUCTION_ID_COUNT, + .field_count = FIELD_COUNT, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .parse_table = &ts_parse_table[0][0], + .small_parse_table = ts_small_parse_table, + .small_parse_table_map = ts_small_parse_table_map, + .parse_actions = ts_parse_actions, + .symbol_names = ts_symbol_names, + .symbol_metadata = ts_symbol_metadata, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .alias_sequences = &ts_alias_sequences[0][0], + .lex_modes = ts_lex_modes, + .lex_fn = ts_lex, + .primary_state_ids = ts_primary_state_ids, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1abdd12 --- /dev/null +++ b/src/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t size); +extern void *(*ts_current_calloc)(size_t count, size_t size); +extern void *(*ts_current_realloc)(void *ptr, size_t size); +extern void (*ts_current_free)(void *ptr); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/src/tree_sitter/array.h b/src/tree_sitter/array.h new file mode 100644 index 0000000..15a3b23 --- /dev/null +++ b/src/tree_sitter/array.h @@ -0,0 +1,290 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + _array__reserve((Array *)(self), array_elem_size(self), new_capacity) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + _array__grow((Array *)(self), count, array_elem_size(self)); \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ + (self)->size += (count); \ + } while (0) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), _index, \ + old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((Array *)(self), array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + self->size += new_count - old_count; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(default : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h new file mode 100644 index 0000000..799f599 --- /dev/null +++ b/src/tree_sitter/parser.h @@ -0,0 +1,266 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef struct { + bool visible; + bool named; + bool supertype; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); + void (*log)(const TSLexer *, const char *, ...); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef union { + struct { + uint8_t type; + TSStateId state; + bool extra; + bool repetition; + } shift; + struct { + uint8_t type; + uint8_t child_count; + TSSymbol symbol; + int16_t dynamic_precedence; + uint16_t production_id; + } reduce; + uint8_t type; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable; + } entry; +} TSParseActionEntry; + +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + uint32_t state_count; + uint32_t large_state_count; + uint32_t production_id_count; + uint32_t field_count; + uint16_t max_alias_sequence_length; + const uint16_t *parse_table; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSParseActionEntry *parse_actions; + const char * const *symbol_names; + const char * const *field_names; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const TSSymbolMetadata *symbol_metadata; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + const TSSymbol *alias_sequences; + const TSLexMode *lex_modes; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + const TSStateId *primary_state_ids; +}; + +static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + +/* + * Lexer Macros + */ + +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + UNUSED \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + goto next_state; \ + } \ + } \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value) \ + } \ + }} + +#define SHIFT_REPEAT(state_value) \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .state = (state_value), \ + .repetition = true \ + } \ + }} + +#define SHIFT_EXTRA() \ + {{ \ + .shift = { \ + .type = TSParseActionTypeShift, \ + .extra = true \ + } \ + }} + +#define REDUCE(symbol_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ + }} + +#define RECOVER() \ + {{ \ + .type = TSParseActionTypeRecover \ + }} + +#define ACCEPT_INPUT() \ + {{ \ + .type = TSParseActionTypeAccept \ + }} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/tree-sitter.json b/tree-sitter.json new file mode 100644 index 0000000..0116816 --- /dev/null +++ b/tree-sitter.json @@ -0,0 +1,34 @@ +{ + "grammars": [ + { + "name": "base_sql", + "camelcase": "BaseSql", + "scope": "source.base_sql", + "file-types": [ + ".sql" + ], + "injection-regex": "^base_sql$" + } + ], + "metadata": { + "version": "0.1.0", + "license": "MIT", + "description": "Common functionality shared across SQL dialects.", + "authors": [ + { + "name": "Vinesh Kannan and Tamjid Rahman" + } + ], + "links": { + "repository": "https://github.com/tree-sitter/tree-sitter-base_sql" + } + }, + "bindings": { + "c": true, + "go": true, + "node": true, + "python": true, + "rust": true, + "swift": true + } +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f4d3b16..8440f1e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1325,6 +1325,16 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +node-addon-api@^8.2.1: + version "8.2.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-8.2.2.tgz#3658f78d04d260aa95931d3bbc45f22ce433b821" + integrity sha512-9emqXAKhVoNrQ792nLI/wpzPpJ/bj/YXxW0CvAau1+RdGBcCRF1Dmz7719zgVsQNrzHl9Tzn3ImZ4qWFarWL0A== + +node-gyp-build@^4.8.2: + version "4.8.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.3.tgz#9187216d24dbee29e44eb20d2ebf62a296bbea1a" + integrity sha512-EMS95CMJzdoSKoIiXo8pxKoL8DYxwIZXYlLmgPb8KUv794abpnLK6ynsCAWNliOjREKruYKdzbh76HHYUHX7nw== + node-releases@^2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" @@ -1537,6 +1547,19 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tree-sitter-cli@^0.24.4: + version "0.24.4" + resolved "https://registry.yarnpkg.com/tree-sitter-cli/-/tree-sitter-cli-0.24.4.tgz#bd9c28af9bbbe350d1fcb2389c2198cec6f59b6e" + integrity sha512-I4sdtDidnujYL0tR0Re9q0UJt5KrITf2m+GMHjT4LH6IC6kpM6eLzSR7RS36Z4t5ZQBjDHvg2QUJHAWQi3P2TA== + +tree-sitter@^0.22.1: + version "0.22.1" + resolved "https://registry.yarnpkg.com/tree-sitter/-/tree-sitter-0.22.1.tgz#5a5296fc0898b21443657e071b050c95c0d7afbd" + integrity sha512-gRO+jk2ljxZlIn20QRskIvpLCMtzuLl5T0BY6L9uvPYD17uUrxlxWkvYCiVqED2q2q7CVtY52Uex4WcYo2FEXw== + dependencies: + node-addon-api "^8.2.1" + node-gyp-build "^4.8.2" + ts-api-utils@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" From 96a754a7223aa1749560b748e597284b8a113740 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 17:23:09 -0500 Subject: [PATCH 02/17] Remove unnecessary bindings. --- .editorconfig | 46 -------------- .gitattributes | 37 ----------- CMakeLists.txt | 58 ----------------- Cargo.toml | 27 -------- Package.swift | 37 ----------- binding.gyp | 30 --------- bindings/c/tree-sitter-base_sql.h | 16 ----- bindings/c/tree-sitter-base_sql.pc.in | 10 --- bindings/go/binding.go | 13 ---- bindings/go/binding_test.go | 15 ----- bindings/python/tests/test_binding.py | 11 ---- .../python/tree_sitter_base_sql/__init__.py | 42 ------------- .../python/tree_sitter_base_sql/__init__.pyi | 10 --- .../python/tree_sitter_base_sql/binding.c | 27 -------- bindings/python/tree_sitter_base_sql/py.typed | 0 bindings/rust/build.rs | 22 ------- bindings/rust/lib.rs | 53 ---------------- bindings/swift/TreeSitterBaseSql/base_sql.h | 16 ----- .../TreeSitterBaseSqlTests.swift | 12 ---- go.mod | 5 -- pyproject.toml | 29 --------- setup.py | 62 ------------------- tree-sitter.json | 10 +-- 23 files changed, 5 insertions(+), 583 deletions(-) delete mode 100644 .editorconfig delete mode 100644 .gitattributes delete mode 100644 CMakeLists.txt delete mode 100644 Cargo.toml delete mode 100644 Package.swift delete mode 100644 binding.gyp delete mode 100644 bindings/c/tree-sitter-base_sql.h delete mode 100644 bindings/c/tree-sitter-base_sql.pc.in delete mode 100644 bindings/go/binding.go delete mode 100644 bindings/go/binding_test.go delete mode 100644 bindings/python/tests/test_binding.py delete mode 100644 bindings/python/tree_sitter_base_sql/__init__.py delete mode 100644 bindings/python/tree_sitter_base_sql/__init__.pyi delete mode 100644 bindings/python/tree_sitter_base_sql/binding.c delete mode 100644 bindings/python/tree_sitter_base_sql/py.typed delete mode 100644 bindings/rust/build.rs delete mode 100644 bindings/rust/lib.rs delete mode 100644 bindings/swift/TreeSitterBaseSql/base_sql.h delete mode 100644 bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift delete mode 100644 go.mod delete mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 65330c4..0000000 --- a/.editorconfig +++ /dev/null @@ -1,46 +0,0 @@ -root = true - -[*] -charset = utf-8 - -[*.{json,toml,yml,gyp}] -indent_style = space -indent_size = 2 - -[*.js] -indent_style = space -indent_size = 2 - -[*.scm] -indent_style = space -indent_size = 2 - -[*.{c,cc,h}] -indent_style = space -indent_size = 4 - -[*.rs] -indent_style = space -indent_size = 4 - -[*.{py,pyi}] -indent_style = space -indent_size = 4 - -[*.swift] -indent_style = space -indent_size = 4 - -[*.go] -indent_style = tab -indent_size = 8 - -[Makefile] -indent_style = tab -indent_size = 8 - -[parser.c] -indent_size = 2 - -[{alloc,array,parser}.h] -indent_size = 2 diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 7e2cae0..0000000 --- a/.gitattributes +++ /dev/null @@ -1,37 +0,0 @@ -* text=auto eol=lf - -# Generated source files -src/*.json linguist-generated -src/parser.c linguist-generated -src/tree_sitter/* linguist-generated - -# C bindings -bindings/c/* linguist-generated -CMakeLists.txt linguist-generated -Makefile linguist-generated - -# Rust bindings -bindings/rust/* linguist-generated -Cargo.toml linguist-generated -Cargo.lock linguist-generated - -# Node.js bindings -bindings/node/* linguist-generated -binding.gyp linguist-generated -package.json linguist-generated -package-lock.json linguist-generated - -# Python bindings -bindings/python/** linguist-generated -setup.py linguist-generated -pyproject.toml linguist-generated - -# Go bindings -bindings/go/* linguist-generated -go.mod linguist-generated -go.sum linguist-generated - -# Swift bindings -bindings/swift/** linguist-generated -Package.swift linguist-generated -Package.resolved linguist-generated diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 5854ff6..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 3.13) - -project(tree-sitter-base_sql - VERSION "0.1.0" - DESCRIPTION "Common functionality shared across SQL dialects." - HOMEPAGE_URL "https://github.com/tree-sitter/tree-sitter-base_sql" - LANGUAGES C) - -option(BUILD_SHARED_LIBS "Build using shared libraries" ON) -option(TREE_SITTER_REUSE_ALLOCATOR "Reuse the library allocator" OFF) - -set(TREE_SITTER_ABI_VERSION 14 CACHE STRING "Tree-sitter ABI version") -if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") - unset(TREE_SITTER_ABI_VERSION CACHE) - message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") -endif() - -find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") - -add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" - DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" - COMMAND "${TREE_SITTER_CLI}" generate src/grammar.json - --abi=${TREE_SITTER_ABI_VERSION} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Generating parser.c") - -add_library(tree-sitter-base_sql src/parser.c) -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) - target_sources(tree-sitter-base_sql PRIVATE src/scanner.c) -endif() -target_include_directories(tree-sitter-base_sql PRIVATE src) - -target_compile_definitions(tree-sitter-base_sql PRIVATE - $<$:TREE_SITTER_REUSE_ALLOCATOR> - $<$:TREE_SITTER_DEBUG>) - -set_target_properties(tree-sitter-base_sql - PROPERTIES - C_STANDARD 11 - POSITION_INDEPENDENT_CODE ON - SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" - DEFINE_SYMBOL "") - -configure_file(bindings/c/tree-sitter-base_sql.pc.in - "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-base_sql.pc" @ONLY) - -include(GNUInstallDirs) - -install(FILES bindings/c/tree-sitter-base_sql.h - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter") -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-base_sql.pc" - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig") -install(TARGETS tree-sitter-base_sql - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") - -add_custom_target(ts-test "${TREE_SITTER_CLI}" test - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "tree-sitter test") diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 5623453..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "tree-sitter-base-sql" -description = "Common functionality shared across SQL dialects." -version = "0.1.0" -authors = ["Vinesh Kannan and Tamjid Rahman"] -license = "MIT" -readme = "README.md" -keywords = ["incremental", "parsing", "tree-sitter", "base-sql"] -categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter-base_sql" -edition = "2021" -autoexamples = false - -build = "bindings/rust/build.rs" -include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json"] - -[lib] -path = "bindings/rust/lib.rs" - -[dependencies] -tree-sitter-language = "0.1" - -[build-dependencies] -cc = "1.1.22" - -[dev-dependencies] -tree-sitter = "0.24.4" diff --git a/Package.swift b/Package.swift deleted file mode 100644 index 05dec4c..0000000 --- a/Package.swift +++ /dev/null @@ -1,37 +0,0 @@ -// swift-tools-version:5.3 -import PackageDescription - -let package = Package( - name: "TreeSitterBaseSql", - products: [ - .library(name: "TreeSitterBaseSql", targets: ["TreeSitterBaseSql"]), - ], - dependencies: [ - .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), - ], - targets: [ - .target( - name: "TreeSitterBaseSql", - dependencies: [], - path: ".", - sources: [ - "src/parser.c", - // NOTE: if your language has an external scanner, add it here. - ], - resources: [ - .copy("queries") - ], - publicHeadersPath: "bindings/swift", - cSettings: [.headerSearchPath("src")] - ), - .testTarget( - name: "TreeSitterBaseSqlTests", - dependencies: [ - "SwiftTreeSitter", - "TreeSitterBaseSql", - ], - path: "bindings/swift/TreeSitterBaseSqlTests" - ) - ], - cLanguageStandard: .c11 -) diff --git a/binding.gyp b/binding.gyp deleted file mode 100644 index c2abd0f..0000000 --- a/binding.gyp +++ /dev/null @@ -1,30 +0,0 @@ -{ - "targets": [ - { - "target_name": "tree_sitter_base_sql_binding", - "dependencies": [ - " object: ... diff --git a/bindings/python/tree_sitter_base_sql/binding.c b/bindings/python/tree_sitter_base_sql/binding.c deleted file mode 100644 index 8eb13d9..0000000 --- a/bindings/python/tree_sitter_base_sql/binding.c +++ /dev/null @@ -1,27 +0,0 @@ -#include - -typedef struct TSLanguage TSLanguage; - -TSLanguage *tree_sitter_base_sql(void); - -static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { - return PyCapsule_New(tree_sitter_base_sql(), "tree_sitter.Language", NULL); -} - -static PyMethodDef methods[] = { - {"language", _binding_language, METH_NOARGS, - "Get the tree-sitter language for this grammar."}, - {NULL, NULL, 0, NULL} -}; - -static struct PyModuleDef module = { - .m_base = PyModuleDef_HEAD_INIT, - .m_name = "_binding", - .m_doc = NULL, - .m_size = -1, - .m_methods = methods -}; - -PyMODINIT_FUNC PyInit__binding(void) { - return PyModule_Create(&module); -} diff --git a/bindings/python/tree_sitter_base_sql/py.typed b/bindings/python/tree_sitter_base_sql/py.typed deleted file mode 100644 index e69de29..0000000 diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs deleted file mode 100644 index ff6a868..0000000 --- a/bindings/rust/build.rs +++ /dev/null @@ -1,22 +0,0 @@ -fn main() { - let src_dir = std::path::Path::new("src"); - - let mut c_config = cc::Build::new(); - c_config.std("c11").include(src_dir); - - #[cfg(target_env = "msvc")] - c_config.flag("-utf-8"); - - let parser_path = src_dir.join("parser.c"); - c_config.file(&parser_path); - println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); - - // NOTE: if your language uses an external scanner, uncomment this block: - /* - let scanner_path = src_dir.join("scanner.c"); - c_config.file(&scanner_path); - println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); - */ - - c_config.compile("tree-sitter-base_sql"); -} diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs deleted file mode 100644 index 5000dd2..0000000 --- a/bindings/rust/lib.rs +++ /dev/null @@ -1,53 +0,0 @@ -//! This crate provides BaseSql language support for the [tree-sitter][] parsing library. -//! -//! Typically, you will use the [LANGUAGE][] constant to add this language to a -//! tree-sitter [Parser][], and then use the parser to parse some code: -//! -//! ``` -//! let code = r#" -//! "#; -//! let mut parser = tree_sitter::Parser::new(); -//! let language = tree_sitter_base_sql::LANGUAGE; -//! parser -//! .set_language(&language.into()) -//! .expect("Error loading BaseSql parser"); -//! let tree = parser.parse(code, None).unwrap(); -//! assert!(!tree.root_node().has_error()); -//! ``` -//! -//! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html -//! [tree-sitter]: https://tree-sitter.github.io/ - -use tree_sitter_language::LanguageFn; - -extern "C" { - fn tree_sitter_base_sql() -> *const (); -} - -/// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar. -/// -/// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html -pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_base_sql) }; - -/// The content of the [`node-types.json`][] file for this grammar. -/// -/// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); - -// NOTE: uncomment these to include any queries that this grammar contains: - -// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); - -#[cfg(test)] -mod tests { - #[test] - fn test_can_load_grammar() { - let mut parser = tree_sitter::Parser::new(); - parser - .set_language(&super::LANGUAGE.into()) - .expect("Error loading BaseSql parser"); - } -} diff --git a/bindings/swift/TreeSitterBaseSql/base_sql.h b/bindings/swift/TreeSitterBaseSql/base_sql.h deleted file mode 100644 index c718758..0000000 --- a/bindings/swift/TreeSitterBaseSql/base_sql.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef TREE_SITTER_BASE_SQL_H_ -#define TREE_SITTER_BASE_SQL_H_ - -typedef struct TSLanguage TSLanguage; - -#ifdef __cplusplus -extern "C" { -#endif - -const TSLanguage *tree_sitter_base_sql(void); - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_BASE_SQL_H_ diff --git a/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift b/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift deleted file mode 100644 index b9231d8..0000000 --- a/bindings/swift/TreeSitterBaseSqlTests/TreeSitterBaseSqlTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import XCTest -import SwiftTreeSitter -import TreeSitterBaseSql - -final class TreeSitterBaseSqlTests: XCTestCase { - func testCanLoadGrammar() throws { - let parser = Parser() - let language = Language(language: tree_sitter_base_sql()) - XCTAssertNoThrow(try parser.setLanguage(language), - "Error loading BaseSql grammar") - } -} diff --git a/go.mod b/go.mod deleted file mode 100644 index 2da404a..0000000 --- a/go.mod +++ /dev/null @@ -1,5 +0,0 @@ -module github.com/tree-sitter/tree-sitter-base_sql - -go 1.22 - -require github.com/tree-sitter/go-tree-sitter v0.24.0 diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index da6daa9..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,29 +0,0 @@ -[build-system] -requires = ["setuptools>=42", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "tree-sitter-base-sql" -description = "Common functionality shared across SQL dialects." -version = "0.1.0" -keywords = ["incremental", "parsing", "tree-sitter", "base-sql"] -classifiers = [ - "Intended Audience :: Developers", - "Topic :: Software Development :: Compilers", - "Topic :: Text Processing :: Linguistic", - "Typing :: Typed", -] -authors = [{ name = "Vinesh Kannan and Tamjid Rahman" }] -requires-python = ">=3.9" -license.text = "MIT" -readme = "README.md" - -[project.urls] -Homepage = "https://github.com/tree-sitter/tree-sitter-base_sql" - -[project.optional-dependencies] -core = ["tree-sitter~=0.22"] - -[tool.cibuildwheel] -build = "cp39-*" -build-frontend = "build" diff --git a/setup.py b/setup.py deleted file mode 100644 index 941bbe1..0000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -from os.path import isdir, join -from platform import system - -from setuptools import Extension, find_packages, setup -from setuptools.command.build import build -from wheel.bdist_wheel import bdist_wheel - - -class Build(build): - def run(self): - if isdir("queries"): - dest = join(self.build_lib, "tree_sitter_base_sql", "queries") - self.copy_tree("queries", dest) - super().run() - - -class BdistWheel(bdist_wheel): - def get_tag(self): - python, abi, platform = super().get_tag() - if python.startswith("cp"): - python, abi = "cp39", "abi3" - return python, abi, platform - - -setup( - packages=find_packages("bindings/python"), - package_dir={"": "bindings/python"}, - package_data={ - "tree_sitter_base_sql": ["*.pyi", "py.typed"], - "tree_sitter_base_sql.queries": ["*.scm"], - }, - ext_package="tree_sitter_base_sql", - ext_modules=[ - Extension( - name="_binding", - sources=[ - "bindings/python/tree_sitter_base_sql/binding.c", - "src/parser.c", - # NOTE: if your language uses an external scanner, add it here. - ], - extra_compile_args=[ - "-std=c11", - "-fvisibility=hidden", - ] if system() != "Windows" else [ - "/std:c11", - "/utf-8", - ], - define_macros=[ - ("Py_LIMITED_API", "0x03090000"), - ("PY_SSIZE_T_CLEAN", None), - ("TREE_SITTER_HIDE_SYMBOLS", None), - ], - include_dirs=["src"], - py_limited_api=True, - ) - ], - cmdclass={ - "build": Build, - "bdist_wheel": BdistWheel - }, - zip_safe=False -) diff --git a/tree-sitter.json b/tree-sitter.json index 0116816..6c1c218 100644 --- a/tree-sitter.json +++ b/tree-sitter.json @@ -24,11 +24,11 @@ } }, "bindings": { - "c": true, - "go": true, + "c": false, + "go": false, "node": true, - "python": true, - "rust": true, - "swift": true + "python": false, + "rust": false, + "swift": false } } \ No newline at end of file From a95405526ef7bb18695008f2dc8595f0ee966c61 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 17:23:34 -0500 Subject: [PATCH 03/17] Remove Makefile. --- Makefile | 94 -------------------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index aab515a..0000000 --- a/Makefile +++ /dev/null @@ -1,94 +0,0 @@ -ifeq ($(OS),Windows_NT) -$(error Windows is not supported) -endif - -LANGUAGE_NAME := tree-sitter-base_sql -HOMEPAGE_URL := https://github.com/tree-sitter/tree-sitter-base_sql -VERSION := 0.1.0 - -# repository -SRC_DIR := src - -TS ?= tree-sitter - -# install directory layout -PREFIX ?= /usr/local -INCLUDEDIR ?= $(PREFIX)/include -LIBDIR ?= $(PREFIX)/lib -PCLIBDIR ?= $(LIBDIR)/pkgconfig - -# source/object files -PARSER := $(SRC_DIR)/parser.c -EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c)) -OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) - -# flags -ARFLAGS ?= rcs -override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC - -# ABI versioning -SONAME_MAJOR = $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER)) -SONAME_MINOR = $(word 1,$(subst ., ,$(VERSION))) - -# OS-specific bits -ifeq ($(shell uname),Darwin) - SOEXT = dylib - SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) - SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) - LINKSHARED = -dynamiclib -Wl,-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks -else - SOEXT = so - SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) - SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) - LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) -endif -ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) - PCLIBDIR := $(PREFIX)/libdata/pkgconfig -endif - -all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc - -lib$(LANGUAGE_NAME).a: $(OBJS) - $(AR) $(ARFLAGS) $@ $^ - -lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) - $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ -ifneq ($(STRIP),) - $(STRIP) $@ -endif - -$(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in - sed -e 's|@PROJECT_VERSION@|$(VERSION)|' \ - -e 's|@CMAKE_INSTALL_LIBDIR@|$(LIBDIR:$(PREFIX)/%=%)|' \ - -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ - -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ - -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ - -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@ - -$(PARSER): $(SRC_DIR)/grammar.json - $(TS) generate $^ - -install: all - install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' - install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h - install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc - install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a - install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) - ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) - ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) - -uninstall: - $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ - '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ - '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ - '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ - '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ - '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc - -clean: - $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) - -test: - $(TS) test - -.PHONY: all install uninstall clean test From 71372295bd6c82cd61d1d81a6cabe0ac71011830 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 17:26:36 -0500 Subject: [PATCH 04/17] Ignore tree_sitter src files. --- .gitignore | 3 + src/tree_sitter/alloc.h | 54 -------- src/tree_sitter/array.h | 290 --------------------------------------- src/tree_sitter/parser.h | 266 ----------------------------------- 4 files changed, 3 insertions(+), 610 deletions(-) delete mode 100644 src/tree_sitter/alloc.h delete mode 100644 src/tree_sitter/array.h delete mode 100644 src/tree_sitter/parser.h diff --git a/.gitignore b/.gitignore index 2c7ae79..53e30b4 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,6 @@ out # Mac OS .DS_Store + +# Tree Sitter +src/tree_sitter/** \ No newline at end of file diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h deleted file mode 100644 index 1abdd12..0000000 --- a/src/tree_sitter/alloc.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef TREE_SITTER_ALLOC_H_ -#define TREE_SITTER_ALLOC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -// Allow clients to override allocation functions -#ifdef TREE_SITTER_REUSE_ALLOCATOR - -extern void *(*ts_current_malloc)(size_t size); -extern void *(*ts_current_calloc)(size_t count, size_t size); -extern void *(*ts_current_realloc)(void *ptr, size_t size); -extern void (*ts_current_free)(void *ptr); - -#ifndef ts_malloc -#define ts_malloc ts_current_malloc -#endif -#ifndef ts_calloc -#define ts_calloc ts_current_calloc -#endif -#ifndef ts_realloc -#define ts_realloc ts_current_realloc -#endif -#ifndef ts_free -#define ts_free ts_current_free -#endif - -#else - -#ifndef ts_malloc -#define ts_malloc malloc -#endif -#ifndef ts_calloc -#define ts_calloc calloc -#endif -#ifndef ts_realloc -#define ts_realloc realloc -#endif -#ifndef ts_free -#define ts_free free -#endif - -#endif - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_ALLOC_H_ diff --git a/src/tree_sitter/array.h b/src/tree_sitter/array.h deleted file mode 100644 index 15a3b23..0000000 --- a/src/tree_sitter/array.h +++ /dev/null @@ -1,290 +0,0 @@ -#ifndef TREE_SITTER_ARRAY_H_ -#define TREE_SITTER_ARRAY_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "./alloc.h" - -#include -#include -#include -#include -#include - -#ifdef _MSC_VER -#pragma warning(disable : 4101) -#elif defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-variable" -#endif - -#define Array(T) \ - struct { \ - T *contents; \ - uint32_t size; \ - uint32_t capacity; \ - } - -/// Initialize an array. -#define array_init(self) \ - ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) - -/// Create an empty array. -#define array_new() \ - { NULL, 0, 0 } - -/// Get a pointer to the element at a given `index` in the array. -#define array_get(self, _index) \ - (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) - -/// Get a pointer to the first element in the array. -#define array_front(self) array_get(self, 0) - -/// Get a pointer to the last element in the array. -#define array_back(self) array_get(self, (self)->size - 1) - -/// Clear the array, setting its size to zero. Note that this does not free any -/// memory allocated for the array's contents. -#define array_clear(self) ((self)->size = 0) - -/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is -/// less than the array's current capacity, this function has no effect. -#define array_reserve(self, new_capacity) \ - _array__reserve((Array *)(self), array_elem_size(self), new_capacity) - -/// Free any memory allocated for this array. Note that this does not free any -/// memory allocated for the array's contents. -#define array_delete(self) _array__delete((Array *)(self)) - -/// Push a new `element` onto the end of the array. -#define array_push(self, element) \ - (_array__grow((Array *)(self), 1, array_elem_size(self)), \ - (self)->contents[(self)->size++] = (element)) - -/// Increase the array's size by `count` elements. -/// New elements are zero-initialized. -#define array_grow_by(self, count) \ - do { \ - if ((count) == 0) break; \ - _array__grow((Array *)(self), count, array_elem_size(self)); \ - memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ - (self)->size += (count); \ - } while (0) - -/// Append all elements from one array to the end of another. -#define array_push_all(self, other) \ - array_extend((self), (other)->size, (other)->contents) - -/// Append `count` elements to the end of the array, reading their values from the -/// `contents` pointer. -#define array_extend(self, count, contents) \ - _array__splice( \ - (Array *)(self), array_elem_size(self), (self)->size, \ - 0, count, contents \ - ) - -/// Remove `old_count` elements from the array starting at the given `index`. At -/// the same index, insert `new_count` new elements, reading their values from the -/// `new_contents` pointer. -#define array_splice(self, _index, old_count, new_count, new_contents) \ - _array__splice( \ - (Array *)(self), array_elem_size(self), _index, \ - old_count, new_count, new_contents \ - ) - -/// Insert one `element` into the array at the given `index`. -#define array_insert(self, _index, element) \ - _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) - -/// Remove one element from the array at the given `index`. -#define array_erase(self, _index) \ - _array__erase((Array *)(self), array_elem_size(self), _index) - -/// Pop the last element off the array, returning the element by value. -#define array_pop(self) ((self)->contents[--(self)->size]) - -/// Assign the contents of one array to another, reallocating if necessary. -#define array_assign(self, other) \ - _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) - -/// Swap one array with another -#define array_swap(self, other) \ - _array__swap((Array *)(self), (Array *)(other)) - -/// Get the size of the array contents -#define array_elem_size(self) (sizeof *(self)->contents) - -/// Search a sorted array for a given `needle` value, using the given `compare` -/// callback to determine the order. -/// -/// If an existing element is found to be equal to `needle`, then the `index` -/// out-parameter is set to the existing value's index, and the `exists` -/// out-parameter is set to true. Otherwise, `index` is set to an index where -/// `needle` should be inserted in order to preserve the sorting, and `exists` -/// is set to false. -#define array_search_sorted_with(self, compare, needle, _index, _exists) \ - _array__search_sorted(self, 0, compare, , needle, _index, _exists) - -/// Search a sorted array for a given `needle` value, using integer comparisons -/// of a given struct field (specified with a leading dot) to determine the order. -/// -/// See also `array_search_sorted_with`. -#define array_search_sorted_by(self, field, needle, _index, _exists) \ - _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) - -/// Insert a given `value` into a sorted array, using the given `compare` -/// callback to determine the order. -#define array_insert_sorted_with(self, compare, value) \ - do { \ - unsigned _index, _exists; \ - array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ - if (!_exists) array_insert(self, _index, value); \ - } while (0) - -/// Insert a given `value` into a sorted array, using integer comparisons of -/// a given struct field (specified with a leading dot) to determine the order. -/// -/// See also `array_search_sorted_by`. -#define array_insert_sorted_by(self, field, value) \ - do { \ - unsigned _index, _exists; \ - array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ - if (!_exists) array_insert(self, _index, value); \ - } while (0) - -// Private - -typedef Array(void) Array; - -/// This is not what you're looking for, see `array_delete`. -static inline void _array__delete(Array *self) { - if (self->contents) { - ts_free(self->contents); - self->contents = NULL; - self->size = 0; - self->capacity = 0; - } -} - -/// This is not what you're looking for, see `array_erase`. -static inline void _array__erase(Array *self, size_t element_size, - uint32_t index) { - assert(index < self->size); - char *contents = (char *)self->contents; - memmove(contents + index * element_size, contents + (index + 1) * element_size, - (self->size - index - 1) * element_size); - self->size--; -} - -/// This is not what you're looking for, see `array_reserve`. -static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { - if (new_capacity > self->capacity) { - if (self->contents) { - self->contents = ts_realloc(self->contents, new_capacity * element_size); - } else { - self->contents = ts_malloc(new_capacity * element_size); - } - self->capacity = new_capacity; - } -} - -/// This is not what you're looking for, see `array_assign`. -static inline void _array__assign(Array *self, const Array *other, size_t element_size) { - _array__reserve(self, element_size, other->size); - self->size = other->size; - memcpy(self->contents, other->contents, self->size * element_size); -} - -/// This is not what you're looking for, see `array_swap`. -static inline void _array__swap(Array *self, Array *other) { - Array swap = *other; - *other = *self; - *self = swap; -} - -/// This is not what you're looking for, see `array_push` or `array_grow_by`. -static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { - uint32_t new_size = self->size + count; - if (new_size > self->capacity) { - uint32_t new_capacity = self->capacity * 2; - if (new_capacity < 8) new_capacity = 8; - if (new_capacity < new_size) new_capacity = new_size; - _array__reserve(self, element_size, new_capacity); - } -} - -/// This is not what you're looking for, see `array_splice`. -static inline void _array__splice(Array *self, size_t element_size, - uint32_t index, uint32_t old_count, - uint32_t new_count, const void *elements) { - uint32_t new_size = self->size + new_count - old_count; - uint32_t old_end = index + old_count; - uint32_t new_end = index + new_count; - assert(old_end <= self->size); - - _array__reserve(self, element_size, new_size); - - char *contents = (char *)self->contents; - if (self->size > old_end) { - memmove( - contents + new_end * element_size, - contents + old_end * element_size, - (self->size - old_end) * element_size - ); - } - if (new_count > 0) { - if (elements) { - memcpy( - (contents + index * element_size), - elements, - new_count * element_size - ); - } else { - memset( - (contents + index * element_size), - 0, - new_count * element_size - ); - } - } - self->size += new_count - old_count; -} - -/// A binary search routine, based on Rust's `std::slice::binary_search_by`. -/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. -#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ - do { \ - *(_index) = start; \ - *(_exists) = false; \ - uint32_t size = (self)->size - *(_index); \ - if (size == 0) break; \ - int comparison; \ - while (size > 1) { \ - uint32_t half_size = size / 2; \ - uint32_t mid_index = *(_index) + half_size; \ - comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ - if (comparison <= 0) *(_index) = mid_index; \ - size -= half_size; \ - } \ - comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ - if (comparison == 0) *(_exists) = true; \ - else if (comparison < 0) *(_index) += 1; \ - } while (0) - -/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) -/// parameter by reference in order to work with the generic sorting function above. -#define _compare_int(a, b) ((int)*(a) - (int)(b)) - -#ifdef _MSC_VER -#pragma warning(default : 4101) -#elif defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_ARRAY_H_ diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h deleted file mode 100644 index 799f599..0000000 --- a/src/tree_sitter/parser.h +++ /dev/null @@ -1,266 +0,0 @@ -#ifndef TREE_SITTER_PARSER_H_ -#define TREE_SITTER_PARSER_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include - -#define ts_builtin_sym_error ((TSSymbol)-1) -#define ts_builtin_sym_end 0 -#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 - -#ifndef TREE_SITTER_API_H_ -typedef uint16_t TSStateId; -typedef uint16_t TSSymbol; -typedef uint16_t TSFieldId; -typedef struct TSLanguage TSLanguage; -#endif - -typedef struct { - TSFieldId field_id; - uint8_t child_index; - bool inherited; -} TSFieldMapEntry; - -typedef struct { - uint16_t index; - uint16_t length; -} TSFieldMapSlice; - -typedef struct { - bool visible; - bool named; - bool supertype; -} TSSymbolMetadata; - -typedef struct TSLexer TSLexer; - -struct TSLexer { - int32_t lookahead; - TSSymbol result_symbol; - void (*advance)(TSLexer *, bool); - void (*mark_end)(TSLexer *); - uint32_t (*get_column)(TSLexer *); - bool (*is_at_included_range_start)(const TSLexer *); - bool (*eof)(const TSLexer *); - void (*log)(const TSLexer *, const char *, ...); -}; - -typedef enum { - TSParseActionTypeShift, - TSParseActionTypeReduce, - TSParseActionTypeAccept, - TSParseActionTypeRecover, -} TSParseActionType; - -typedef union { - struct { - uint8_t type; - TSStateId state; - bool extra; - bool repetition; - } shift; - struct { - uint8_t type; - uint8_t child_count; - TSSymbol symbol; - int16_t dynamic_precedence; - uint16_t production_id; - } reduce; - uint8_t type; -} TSParseAction; - -typedef struct { - uint16_t lex_state; - uint16_t external_lex_state; -} TSLexMode; - -typedef union { - TSParseAction action; - struct { - uint8_t count; - bool reusable; - } entry; -} TSParseActionEntry; - -typedef struct { - int32_t start; - int32_t end; -} TSCharacterRange; - -struct TSLanguage { - uint32_t version; - uint32_t symbol_count; - uint32_t alias_count; - uint32_t token_count; - uint32_t external_token_count; - uint32_t state_count; - uint32_t large_state_count; - uint32_t production_id_count; - uint32_t field_count; - uint16_t max_alias_sequence_length; - const uint16_t *parse_table; - const uint16_t *small_parse_table; - const uint32_t *small_parse_table_map; - const TSParseActionEntry *parse_actions; - const char * const *symbol_names; - const char * const *field_names; - const TSFieldMapSlice *field_map_slices; - const TSFieldMapEntry *field_map_entries; - const TSSymbolMetadata *symbol_metadata; - const TSSymbol *public_symbol_map; - const uint16_t *alias_map; - const TSSymbol *alias_sequences; - const TSLexMode *lex_modes; - bool (*lex_fn)(TSLexer *, TSStateId); - bool (*keyword_lex_fn)(TSLexer *, TSStateId); - TSSymbol keyword_capture_token; - struct { - const bool *states; - const TSSymbol *symbol_map; - void *(*create)(void); - void (*destroy)(void *); - bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); - unsigned (*serialize)(void *, char *); - void (*deserialize)(void *, const char *, unsigned); - } external_scanner; - const TSStateId *primary_state_ids; -}; - -static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { - uint32_t index = 0; - uint32_t size = len - index; - while (size > 1) { - uint32_t half_size = size / 2; - uint32_t mid_index = index + half_size; - TSCharacterRange *range = &ranges[mid_index]; - if (lookahead >= range->start && lookahead <= range->end) { - return true; - } else if (lookahead > range->end) { - index = mid_index; - } - size -= half_size; - } - TSCharacterRange *range = &ranges[index]; - return (lookahead >= range->start && lookahead <= range->end); -} - -/* - * Lexer Macros - */ - -#ifdef _MSC_VER -#define UNUSED __pragma(warning(suppress : 4101)) -#else -#define UNUSED __attribute__((unused)) -#endif - -#define START_LEXER() \ - bool result = false; \ - bool skip = false; \ - UNUSED \ - bool eof = false; \ - int32_t lookahead; \ - goto start; \ - next_state: \ - lexer->advance(lexer, skip); \ - start: \ - skip = false; \ - lookahead = lexer->lookahead; - -#define ADVANCE(state_value) \ - { \ - state = state_value; \ - goto next_state; \ - } - -#define ADVANCE_MAP(...) \ - { \ - static const uint16_t map[] = { __VA_ARGS__ }; \ - for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ - if (map[i] == lookahead) { \ - state = map[i + 1]; \ - goto next_state; \ - } \ - } \ - } - -#define SKIP(state_value) \ - { \ - skip = true; \ - state = state_value; \ - goto next_state; \ - } - -#define ACCEPT_TOKEN(symbol_value) \ - result = true; \ - lexer->result_symbol = symbol_value; \ - lexer->mark_end(lexer); - -#define END_STATE() return result; - -/* - * Parse Table Macros - */ - -#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) - -#define STATE(id) id - -#define ACTIONS(id) id - -#define SHIFT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = (state_value) \ - } \ - }} - -#define SHIFT_REPEAT(state_value) \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .state = (state_value), \ - .repetition = true \ - } \ - }} - -#define SHIFT_EXTRA() \ - {{ \ - .shift = { \ - .type = TSParseActionTypeShift, \ - .extra = true \ - } \ - }} - -#define REDUCE(symbol_name, children, precedence, prod_id) \ - {{ \ - .reduce = { \ - .type = TSParseActionTypeReduce, \ - .symbol = symbol_name, \ - .child_count = children, \ - .dynamic_precedence = precedence, \ - .production_id = prod_id \ - }, \ - }} - -#define RECOVER() \ - {{ \ - .type = TSParseActionTypeRecover \ - }} - -#define ACCEPT_INPUT() \ - {{ \ - .type = TSParseActionTypeAccept \ - }} - -#ifdef __cplusplus -} -#endif - -#endif // TREE_SITTER_PARSER_H_ From ae5389f607adaa0bbc3e26ab6337066c7b543987 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 18:55:53 -0500 Subject: [PATCH 05/17] Parse a bunch of SQL files. --- examples/create_table.sql | 10 + examples/delete.sql | 2 + examples/inner_join_left_outer_join.sql | 4 + examples/insert_multiple_values.sql | 4 + examples/insert_select.sql | 3 + examples/insert_single_value.sql | 2 + examples/query_clauses.sql | 7 + examples/select_aggregate_clauses.sql | 14 + examples/select_star.sql | 1 + examples/update.sql | 4 + grammar.js | 201 - grammars/baseSql.js | 250 + package.json | 5 +- src/grammar.json | 1206 ++- src/node-types.json | 470 +- src/parser.c | 11665 ++++++++++++++++------ 16 files changed, 10283 insertions(+), 3565 deletions(-) create mode 100644 examples/create_table.sql create mode 100644 examples/delete.sql create mode 100644 examples/inner_join_left_outer_join.sql create mode 100644 examples/insert_multiple_values.sql create mode 100644 examples/insert_select.sql create mode 100644 examples/insert_single_value.sql create mode 100644 examples/query_clauses.sql create mode 100644 examples/select_aggregate_clauses.sql create mode 100644 examples/select_star.sql create mode 100644 examples/update.sql delete mode 100644 grammar.js create mode 100644 grammars/baseSql.js diff --git a/examples/create_table.sql b/examples/create_table.sql new file mode 100644 index 0000000..cc48fd9 --- /dev/null +++ b/examples/create_table.sql @@ -0,0 +1,10 @@ +CREATE TABLE employees ( + id INTEGER PRIMARY KEY, + first_name VARCHAR(50) NOT NULL, + last_name VARCHAR(50) NOT NULL, + email VARCHAR(100) UNIQUE, + salary DECIMAL DEFAULT 50000, + hire_date DATE NOT NULL, + department_id INT REFERENCES departments(id), + is_active BOOLEAN DEFAULT TRUE +); \ No newline at end of file diff --git a/examples/delete.sql b/examples/delete.sql new file mode 100644 index 0000000..63a2644 --- /dev/null +++ b/examples/delete.sql @@ -0,0 +1,2 @@ +DELETE FROM employees +WHERE termination_date < '2023-01-01'; \ No newline at end of file diff --git a/examples/inner_join_left_outer_join.sql b/examples/inner_join_left_outer_join.sql new file mode 100644 index 0000000..0f7fdb9 --- /dev/null +++ b/examples/inner_join_left_outer_join.sql @@ -0,0 +1,4 @@ +SELECT e.first_name, e.last_name, d.department_name +FROM employees e +INNER JOIN departments d ON e.department_id = d.id +LEFT OUTER JOIN locations l ON d.location_id = l.id; \ No newline at end of file diff --git a/examples/insert_multiple_values.sql b/examples/insert_multiple_values.sql new file mode 100644 index 0000000..818b9a5 --- /dev/null +++ b/examples/insert_multiple_values.sql @@ -0,0 +1,4 @@ +INSERT INTO employees (first_name, last_name, salary) +VALUES + ('Jane', 'Smith', 80000), + ('Bob', 'Johnson', 65000); \ No newline at end of file diff --git a/examples/insert_select.sql b/examples/insert_select.sql new file mode 100644 index 0000000..369ac4f --- /dev/null +++ b/examples/insert_select.sql @@ -0,0 +1,3 @@ +INSERT INTO employee_archive +SELECT * FROM employees +WHERE termination_date IS NOT NULL; \ No newline at end of file diff --git a/examples/insert_single_value.sql b/examples/insert_single_value.sql new file mode 100644 index 0000000..79ee63d --- /dev/null +++ b/examples/insert_single_value.sql @@ -0,0 +1,2 @@ +INSERT INTO employees (first_name, last_name, salary) +VALUES ('John', 'Doe', 75000); \ No newline at end of file diff --git a/examples/query_clauses.sql b/examples/query_clauses.sql new file mode 100644 index 0000000..e6f19dd --- /dev/null +++ b/examples/query_clauses.sql @@ -0,0 +1,7 @@ +SELECT first_name, last_name, salary AS annual_pay +FROM employees +WHERE department_id = 100 +GROUP BY department_id +HAVING AVG(salary) > 50000 +ORDER BY last_name DESC +LIMIT 10; \ No newline at end of file diff --git a/examples/select_aggregate_clauses.sql b/examples/select_aggregate_clauses.sql new file mode 100644 index 0000000..4a8d20f --- /dev/null +++ b/examples/select_aggregate_clauses.sql @@ -0,0 +1,14 @@ +SELECT + d.department_name, + COUNT(*) AS employee_count, + AVG(e.salary) AS avg_salary, + MAX(e.hire_date) AS latest_hire +FROM employees e +LEFT JOIN departments d ON e.department_id = d.id +WHERE e.salary > 50000 + AND e.hire_date >= '2022-01-01' + AND (e.first_name LIKE 'J%' OR e.last_name LIKE 'S%') +GROUP BY d.department_name +HAVING COUNT(*) > 5 +ORDER BY avg_salary DESC +LIMIT 5; \ No newline at end of file diff --git a/examples/select_star.sql b/examples/select_star.sql new file mode 100644 index 0000000..578fc3b --- /dev/null +++ b/examples/select_star.sql @@ -0,0 +1 @@ +SELECT * FROM employees; \ No newline at end of file diff --git a/examples/update.sql b/examples/update.sql new file mode 100644 index 0000000..24dd18e --- /dev/null +++ b/examples/update.sql @@ -0,0 +1,4 @@ +UPDATE employees +SET salary = salary * 1.1, + last_modified = CURRENT_TIMESTAMP +WHERE department_id = 100; \ No newline at end of file diff --git a/grammar.js b/grammar.js deleted file mode 100644 index d49c570..0000000 --- a/grammar.js +++ /dev/null @@ -1,201 +0,0 @@ -/** - * @file Common functionality shared across SQL dialects. - * @author Vinesh Kannan and Tamjid Rahman - * @license MIT - */ - -/// - -export default grammar({ - name: "base_sql", - - rules: { - source_file: $ => repeat($._statement), - - _statement: $ => seq( - choice( - $.select_statement, - // $.insert_statement, - // $.update_statement, - // $.delete_statement, - // $.create_table_statement - ), - optional(';') - ), - - // SELECT statement and its components - select_statement: $ => seq( - 'SELECT', - $._select_elements, - optional($._from_clause), - optional($._where_clause), - optional($._group_by_clause), - optional($._having_clause), - optional($._order_by_clause), - optional($._limit_clause) - ), - - _select_elements: $ => choice( - '*', - commaSep1($._select_element) - ), - - _select_element: $ => prec(1, choice( - $._expression, - $.column_reference, - $.alias - )), - - alias: $ => seq( - $._expression, - 'AS', - $.identifier - ), - - _from_clause: $ => seq( - 'FROM', - commaSep1($._table_reference) - ), - - _table_reference: $ => choice( - $.table_name, - $.join_clause - ), - - join_clause: $ => prec.left(seq( - $._table_reference, - repeat1(seq( - choice( - 'JOIN', - seq('LEFT', optional('OUTER'), 'JOIN'), - seq('RIGHT', optional('OUTER'), 'JOIN'), - seq('INNER', 'JOIN'), - seq('FULL', optional('OUTER'), 'JOIN') - ), - $._table_reference, - 'ON', - $._expression - )) - )), - - _where_clause: $ => seq( - 'WHERE', - $._expression - ), - - _group_by_clause: $ => seq( - 'GROUP', - 'BY', - commaSep1($._expression) - ), - - _having_clause: $ => seq( - 'HAVING', - $._expression - ), - - _order_by_clause: $ => seq( - 'ORDER', - 'BY', - commaSep1($.order_by_element) - ), - - order_by_element: $ => seq( - $._expression, - optional(choice('ASC', 'DESC')) - ), - - _limit_clause: $ => seq( - 'LIMIT', - $.number - ), - - // Basic expressions - _expression: $ => prec(0, choice( - $.binary_expression, - $.unary_expression, - $.parenthesized_expression, - $.function_call, - $.column_reference, - $.literal - )), - - binary_expression: $ => choice( - ...[ - ['AND', 2], - ['OR', 1], - ['=', 3], - ['!=', 3], - ['<>', 3], - ['<', 3], - ['<=', 3], - ['>', 3], - ['>=', 3], - ['+', 4], - ['-', 4], - ['*', 5], - ['/', 5], - ].map(([operator, precedence]) => - prec.left(precedence, seq( - $._expression, - operator, - $._expression - )) - ) - ), - - unary_expression: $ => choice( - prec(6, seq('NOT', $._expression)), - prec(6, seq('-', $._expression)) - ), - - parenthesized_expression: $ => seq( - '(', - $._expression, - ')' - ), - - function_call: $ => seq( - $.identifier, - '(', - optional(commaSep1($._expression)), - ')' - ), - - // Basic elements - column_reference: $ => seq( - optional(seq($.identifier, '.')), - $.identifier - ), - - table_name: $ => seq( - optional(seq($.identifier, '.')), - $.identifier - ), - - literal: $ => choice( - $.string, - $.number, - $.boolean, - $.null - ), - - string: $ => choice( - seq("'", /[^']*/, "'"), - seq('"', /[^"]*/, '"') - ), - - number: $ => /\d+(\.\d+)?/, - - boolean: $ => choice('TRUE', 'FALSE'), - - null: $ => 'NULL', - - identifier: $ => /[a-zA-Z_][a-zA-Z0-9_]*/, - } -}); - -// Helper functions for common patterns -function commaSep1(rule) { - return seq(rule, repeat(seq(',', rule))); -} diff --git a/grammars/baseSql.js b/grammars/baseSql.js new file mode 100644 index 0000000..19d1b0b --- /dev/null +++ b/grammars/baseSql.js @@ -0,0 +1,250 @@ +/** + * This is a tree-sitter grammar for ANSI SQL. + * @file Common functionality shared across SQL dialects. + * @author Vinesh Kannan and Tamjid Rahman + * @license MIT + */ + +/// + +export default grammar({ + name: "base_sql", + + rules: { + source_file: ($) => repeat($._statement), + + _statement: ($) => + seq( + choice( + $.select_statement, + $.insert_statement, + $.update_statement, + $.delete_statement, + $.create_table_statement + ), + optional(";") + ), + + // SELECT statement and its components + select_statement: ($) => + seq( + "SELECT", + $._select_elements, + optional($._from_clause), + optional($._where_clause), + optional($._group_by_clause), + optional($._having_clause), + optional($._order_by_clause), + optional($._limit_clause) + ), + + _select_elements: ($) => choice("*", commaSep1($._select_element)), + + _select_element: ($) => seq($._expression, optional($.alias_suffix)), + + alias_suffix: ($) => + choice( + // WITH 'AS' keyword + seq($.alias_token, $.identifier), + // WITHOUT 'AS' keyword + $.identifier + ), + + alias_token: ($) => token("AS"), + + _from_clause: ($) => seq("FROM", commaSep1($._table_reference)), + + _table_reference: ($) => choice($.table_alias, $.join_clause), + + table_alias: ($) => seq($.table_name, optional($.alias_suffix)), + + join_clause: ($) => prec.left(2, seq($._table_reference, $.join_list)), + + join_table: ($) => + prec.left( + seq( + choice( + "JOIN", + seq("LEFT", optional("OUTER"), "JOIN"), + seq("RIGHT", optional("OUTER"), "JOIN"), + seq("INNER", "JOIN"), + seq("FULL", optional("OUTER"), "JOIN") + ), + $._table_reference, + "ON", + $._expression + ) + ), + + join_list: ($) => + prec.left(1, seq($.join_table, optional(seq(",", $.join_table)))), + + _where_clause: ($) => seq("WHERE", $._expression), + + _group_by_clause: ($) => seq("GROUP", "BY", commaSep1($._expression)), + + _having_clause: ($) => seq("HAVING", $._expression), + + _order_by_clause: ($) => seq("ORDER", "BY", commaSep1($.order_by_element)), + + order_by_element: ($) => + seq($._expression, optional(choice("ASC", "DESC"))), + + _limit_clause: ($) => seq("LIMIT", $.number), + + // INSERT statement + insert_statement: ($) => + seq( + "INSERT", + "INTO", + $.table_name, + seq( + optional(seq("(", commaSep1($.identifier), ")")), + choice( + // VALUES syntax + seq("VALUES", commaSep1(seq("(", commaSep1($._expression), ")"))), + // SELECT syntax + seq( + optional(seq("(", commaSep1($.identifier), ")")), + $.select_statement + ) + ) + ) + ), + + // UPDATE statement + update_statement: ($) => + seq( + "UPDATE", + $.table_name, + "SET", + commaSep1($.update_assignment), + optional($._where_clause) + ), + + update_assignment: ($) => seq($.identifier, "=", $._expression), + + // DELETE statement + delete_statement: ($) => + seq("DELETE", "FROM", $.table_name, optional($._where_clause)), + + // CREATE TABLE statement + create_table_statement: ($) => + seq( + "CREATE", + "TABLE", + $.table_name, + "(", + commaSep1($.column_definition), + ")" + ), + + column_definition: ($) => + seq($.identifier, $.data_type, repeat($.column_constraint)), + + data_type: ($) => + choice( + "INT", + "INTEGER", + "BIGINT", + "SMALLINT", + "VARCHAR", + "TEXT", + "CHAR", + "DATE", + "TIMESTAMP", + "BOOLEAN", + "FLOAT", + "DOUBLE", + "DECIMAL", + seq("VARCHAR", "(", $.number, ")"), + seq("CHAR", "(", $.number, ")") + ), + + column_constraint: ($) => + choice( + "PRIMARY KEY", + "NOT NULL", + "UNIQUE", + seq("DEFAULT", $._expression), + seq("REFERENCES", $.table_name, optional(seq("(", $.identifier, ")"))) + ), + + // Basic expressions + _expression: ($) => + prec( + 0, + choice( + $.binary_expression, + $.unary_expression, + $.parenthesized_expression, + $.function_call, + $.column_reference, + $.literal + ) + ), + + binary_expression: ($) => + choice( + ...[ + ["OR", 1], + ["AND", 2], + ["=", 3], + ["!=", 3], + ["<>", 3], + ["<", 3], + ["<=", 3], + [">", 3], + [">=", 3], + ["LIKE", 3], + ["+", 4], + ["-", 4], + ["*", 5], + ["/", 5], + ].map(([operator, precedence]) => + prec.left(precedence, seq($._expression, operator, $._expression)) + ), + prec.left(3, seq($._expression, "IS", "NULL")), + prec.left(3, seq($._expression, "IS", "NOT", "NULL")) + ), + + unary_expression: ($) => + choice( + prec(6, seq("NOT", $._expression)), + prec(6, seq("-", $._expression)) + ), + + parenthesized_expression: ($) => seq("(", $._expression, ")"), + + function_call: ($) => + seq( + $.identifier, + "(", + choice("*", optional(commaSep1($._expression))), + ")" + ), + + // Basic elements + column_reference: ($) => + seq(optional(seq($.identifier, ".")), $.identifier), + + table_name: ($) => seq(optional(seq($.identifier, ".")), $.identifier), + + literal: ($) => choice($.string, $.number, $.boolean, $.null), + + string: ($) => choice(seq("'", /[^']*/, "'"), seq('"', /[^"]*/, '"')), + + number: ($) => /\d+(\.\d+)?/, + + boolean: ($) => choice("TRUE", "FALSE"), + + null: ($) => "NULL", + + identifier: ($) => token(/[a-zA-Z_][a-zA-Z0-9_]*/), + }, +}); + +// Helper functions for common patterns +function commaSep1(rule) { + return seq(rule, repeat(seq(",", rule))); +} diff --git a/package.json b/package.json index 5301a7c..8573bdc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "build": "tsc -b && vite build", "lint": "eslint .", "preview": "vite preview", - "tree-sitter": "tree-sitter" + "tree-sitter": "tree-sitter", + "tsg": "tree-sitter generate grammars/baseSql.js", + "tsp": "tree-sitter parse", + "tsp-all": "tree-sitter parse examples/**/*.sql --quiet --stat" }, "dependencies": { "@duckdb/duckdb-wasm": "^1.29.0", diff --git a/src/grammar.json b/src/grammar.json index a939063..0e23a64 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -18,6 +18,22 @@ { "type": "SYMBOL", "name": "select_statement" + }, + { + "type": "SYMBOL", + "name": "insert_statement" + }, + { + "type": "SYMBOL", + "name": "update_statement" + }, + { + "type": "SYMBOL", + "name": "delete_statement" + }, + { + "type": "SYMBOL", + "name": "create_table_statement" } ] }, @@ -155,27 +171,6 @@ ] }, "_select_element": { - "type": "PREC", - "value": 1, - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "SYMBOL", - "name": "column_reference" - }, - { - "type": "SYMBOL", - "name": "alias" - } - ] - } - }, - "alias": { "type": "SEQ", "members": [ { @@ -183,8 +178,34 @@ "name": "_expression" }, { - "type": "STRING", - "value": "AS" + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "alias_suffix" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "alias_suffix": { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "alias_token" + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] }, { "type": "SYMBOL", @@ -192,6 +213,13 @@ } ] }, + "alias_token": { + "type": "TOKEN", + "content": { + "type": "STRING", + "value": "AS" + } + }, "_from_clause": { "type": "SEQ", "members": [ @@ -231,7 +259,7 @@ "members": [ { "type": "SYMBOL", - "name": "table_name" + "name": "table_alias" }, { "type": "SYMBOL", @@ -239,9 +267,30 @@ } ] }, + "table_alias": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "table_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "alias_suffix" + }, + { + "type": "BLANK" + } + ] + } + ] + }, "join_clause": { "type": "PREC_LEFT", - "value": 0, + "value": 2, "content": { "type": "SEQ", "members": [ @@ -250,155 +299,664 @@ "name": "_table_reference" }, { - "type": "REPEAT1", - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "JOIN" - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "LEFT" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "RIGHT" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "INNER" - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "FULL" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - } - ] - }, - { - "type": "SYMBOL", - "name": "_table_reference" - }, - { - "type": "STRING", - "value": "ON" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } + "type": "SYMBOL", + "name": "join_list" } ] } }, - "_where_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "WHERE" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - "_group_by_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "GROUP" + "join_table": { + "type": "PREC_LEFT", + "value": 0, + "content": { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "JOIN" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "LEFT" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "RIGHT" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "INNER" + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "FULL" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "OUTER" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "JOIN" + } + ] + } + ] + }, + { + "type": "SYMBOL", + "name": "_table_reference" + }, + { + "type": "STRING", + "value": "ON" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, + "join_list": { + "type": "PREC_LEFT", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "join_table" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "join_table" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "_where_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "WHERE" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "_group_by_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "GROUP" + }, + { + "type": "STRING", + "value": "BY" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + } + ] + }, + "_having_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "HAVING" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "_order_by_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "ORDER" + }, + { + "type": "STRING", + "value": "BY" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "order_by_element" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "order_by_element" + } + ] + } + } + ] + } + ] + }, + "order_by_element": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "STRING", + "value": "ASC" + }, + { + "type": "STRING", + "value": "DESC" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "_limit_clause": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "LIMIT" + }, + { + "type": "SYMBOL", + "name": "number" + } + ] + }, + "insert_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "INSERT" + }, + { + "type": "STRING", + "value": "INTO" + }, + { + "type": "SYMBOL", + "name": "table_name" + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "VALUES" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + } + ] + } + } + ] + } + ] + }, + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "identifier" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "SYMBOL", + "name": "select_statement" + } + ] + } + ] + } + ] + } + ] + }, + "update_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "UPDATE" + }, + { + "type": "SYMBOL", + "name": "table_name" + }, + { + "type": "STRING", + "value": "SET" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "update_assignment" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "update_assignment" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_where_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "update_assignment": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + "delete_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "DELETE" + }, + { + "type": "STRING", + "value": "FROM" + }, + { + "type": "SYMBOL", + "name": "table_name" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_where_clause" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "create_table_statement": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "CREATE" + }, + { + "type": "STRING", + "value": "TABLE" + }, + { + "type": "SYMBOL", + "name": "table_name" }, { "type": "STRING", - "value": "BY" + "value": "(" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", - "name": "_expression" + "name": "column_definition" }, { "type": "REPEAT", @@ -411,109 +969,206 @@ }, { "type": "SYMBOL", - "name": "_expression" + "name": "column_definition" } ] } } ] + }, + { + "type": "STRING", + "value": ")" } ] }, - "_having_clause": { + "column_definition": { "type": "SEQ", "members": [ { - "type": "STRING", - "value": "HAVING" + "type": "SYMBOL", + "name": "identifier" }, { "type": "SYMBOL", - "name": "_expression" + "name": "data_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SYMBOL", + "name": "column_constraint" + } } ] }, - "_order_by_clause": { - "type": "SEQ", + "data_type": { + "type": "CHOICE", "members": [ { "type": "STRING", - "value": "ORDER" + "value": "INT" }, { "type": "STRING", - "value": "BY" + "value": "INTEGER" + }, + { + "type": "STRING", + "value": "BIGINT" + }, + { + "type": "STRING", + "value": "SMALLINT" + }, + { + "type": "STRING", + "value": "VARCHAR" + }, + { + "type": "STRING", + "value": "TEXT" + }, + { + "type": "STRING", + "value": "CHAR" + }, + { + "type": "STRING", + "value": "DATE" + }, + { + "type": "STRING", + "value": "TIMESTAMP" + }, + { + "type": "STRING", + "value": "BOOLEAN" + }, + { + "type": "STRING", + "value": "FLOAT" + }, + { + "type": "STRING", + "value": "DOUBLE" + }, + { + "type": "STRING", + "value": "DECIMAL" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "VARCHAR" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "number" + }, + { + "type": "STRING", + "value": ")" + } + ] }, { "type": "SEQ", "members": [ + { + "type": "STRING", + "value": "CHAR" + }, + { + "type": "STRING", + "value": "(" + }, { "type": "SYMBOL", - "name": "order_by_element" + "name": "number" }, { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "order_by_element" - } - ] - } + "type": "STRING", + "value": ")" } ] } ] }, - "order_by_element": { - "type": "SEQ", + "column_constraint": { + "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "_expression" + "type": "STRING", + "value": "PRIMARY KEY" }, { - "type": "CHOICE", + "type": "STRING", + "value": "NOT NULL" + }, + { + "type": "STRING", + "value": "UNIQUE" + }, + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "DEFAULT" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + }, + { + "type": "SEQ", "members": [ + { + "type": "STRING", + "value": "REFERENCES" + }, + { + "type": "SYMBOL", + "name": "table_name" + }, { "type": "CHOICE", "members": [ { - "type": "STRING", - "value": "ASC" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SYMBOL", + "name": "identifier" + }, + { + "type": "STRING", + "value": ")" + } + ] }, { - "type": "STRING", - "value": "DESC" + "type": "BLANK" } ] - }, - { - "type": "BLANK" } ] } ] }, - "_limit_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "LIMIT" - }, - { - "type": "SYMBOL", - "name": "number" - } - ] - }, "_expression": { "type": "PREC", "value": 0, @@ -552,7 +1207,7 @@ "members": [ { "type": "PREC_LEFT", - "value": 2, + "value": 1, "content": { "type": "SEQ", "members": [ @@ -562,7 +1217,7 @@ }, { "type": "STRING", - "value": "AND" + "value": "OR" }, { "type": "SYMBOL", @@ -573,7 +1228,7 @@ }, { "type": "PREC_LEFT", - "value": 1, + "value": 2, "content": { "type": "SEQ", "members": [ @@ -583,7 +1238,7 @@ }, { "type": "STRING", - "value": "OR" + "value": "AND" }, { "type": "SYMBOL", @@ -739,6 +1394,27 @@ ] } }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "LIKE" + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + }, { "type": "PREC_LEFT", "value": 4, @@ -822,6 +1498,52 @@ } ] } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "IS" + }, + { + "type": "STRING", + "value": "NULL" + } + ] + } + }, + { + "type": "PREC_LEFT", + "value": 3, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "STRING", + "value": "IS" + }, + { + "type": "STRING", + "value": "NOT" + }, + { + "type": "STRING", + "value": "NULL" + } + ] + } } ] }, @@ -896,32 +1618,41 @@ "type": "CHOICE", "members": [ { - "type": "SEQ", + "type": "STRING", + "value": "*" + }, + { + "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "_expression" + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_expression" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_expression" + } + ] + } + } + ] }, { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } + "type": "BLANK" } ] - }, - { - "type": "BLANK" } ] }, @@ -1073,8 +1804,11 @@ "value": "NULL" }, "identifier": { - "type": "PATTERN", - "value": "[a-zA-Z_][a-zA-Z0-9_]*" + "type": "TOKEN", + "content": { + "type": "PATTERN", + "value": "[a-zA-Z_][a-zA-Z0-9_]*" + } } }, "extras": [ diff --git a/src/node-types.json b/src/node-types.json index f2e4369..f2c001d 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,6 +1,6 @@ [ { - "type": "alias", + "type": "alias_suffix", "named": true, "fields": {}, "children": { @@ -8,19 +8,34 @@ "required": true, "types": [ { - "type": "binary_expression", + "type": "alias_token", "named": true }, { - "type": "column_reference", + "type": "identifier", + "named": true + } + ] + } + }, + { + "type": "binary_expression", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", "named": true }, { - "type": "function_call", + "type": "column_reference", "named": true }, { - "type": "identifier", + "type": "function_call", "named": true }, { @@ -39,12 +54,17 @@ } }, { - "type": "binary_expression", + "type": "boolean", + "named": true, + "fields": {} + }, + { + "type": "column_constraint", "named": true, "fields": {}, "children": { "multiple": true, - "required": true, + "required": false, "types": [ { "type": "binary_expression", @@ -58,6 +78,10 @@ "type": "function_call", "named": true }, + { + "type": "identifier", + "named": true + }, { "type": "literal", "named": true @@ -66,6 +90,10 @@ "type": "parenthesized_expression", "named": true }, + { + "type": "table_name", + "named": true + }, { "type": "unary_expression", "named": true @@ -74,9 +102,27 @@ } }, { - "type": "boolean", + "type": "column_definition", "named": true, - "fields": {} + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "column_constraint", + "named": true + }, + { + "type": "data_type", + "named": true + }, + { + "type": "identifier", + "named": true + } + ] + } }, { "type": "column_reference", @@ -93,6 +139,79 @@ ] } }, + { + "type": "create_table_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "column_definition", + "named": true + }, + { + "type": "table_name", + "named": true + } + ] + } + }, + { + "type": "data_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": false, + "types": [ + { + "type": "number", + "named": true + } + ] + } + }, + { + "type": "delete_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "table_name", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, { "type": "function_call", "named": true, @@ -132,10 +251,95 @@ ] } }, + { + "type": "insert_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "select_statement", + "named": true + }, + { + "type": "table_name", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, { "type": "join_clause", "named": true, "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "join_clause", + "named": true + }, + { + "type": "join_list", + "named": true + }, + { + "type": "table_alias", + "named": true + } + ] + } + }, + { + "type": "join_list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "join_table", + "named": true + } + ] + } + }, + { + "type": "join_table", + "named": true, + "fields": {}, "children": { "multiple": true, "required": true, @@ -165,7 +369,7 @@ "named": true }, { - "type": "table_name", + "type": "table_alias", "named": true }, { @@ -202,6 +406,11 @@ ] } }, + { + "type": "null", + "named": true, + "fields": {} + }, { "type": "order_by_element", "named": true, @@ -281,7 +490,7 @@ "required": false, "types": [ { - "type": "alias", + "type": "alias_suffix", "named": true }, { @@ -317,7 +526,7 @@ "named": true }, { - "type": "table_name", + "type": "table_alias", "named": true }, { @@ -336,9 +545,25 @@ "multiple": true, "required": false, "types": [ + { + "type": "create_table_statement", + "named": true + }, + { + "type": "delete_statement", + "named": true + }, + { + "type": "insert_statement", + "named": true + }, { "type": "select_statement", "named": true + }, + { + "type": "update_statement", + "named": true } ] } @@ -348,6 +573,25 @@ "named": true, "fields": {} }, + { + "type": "table_alias", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "alias_suffix", + "named": true + }, + { + "type": "table_name", + "named": true + } + ] + } + }, { "type": "table_name", "named": true, @@ -398,6 +642,88 @@ ] } }, + { + "type": "update_assignment", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "identifier", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "unary_expression", + "named": true + } + ] + } + }, + { + "type": "update_statement", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "binary_expression", + "named": true + }, + { + "type": "column_reference", + "named": true + }, + { + "type": "function_call", + "named": true + }, + { + "type": "literal", + "named": true + }, + { + "type": "parenthesized_expression", + "named": true + }, + { + "type": "table_name", + "named": true + }, + { + "type": "unary_expression", + "named": true + }, + { + "type": "update_assignment", + "named": true + } + ] + } + }, { "type": "!=", "named": false @@ -475,25 +801,61 @@ "named": false }, { - "type": "AS", + "type": "ASC", "named": false }, { - "type": "ASC", + "type": "BIGINT", + "named": false + }, + { + "type": "BOOLEAN", "named": false }, { "type": "BY", "named": false }, + { + "type": "CHAR", + "named": false + }, + { + "type": "CREATE", + "named": false + }, + { + "type": "DATE", + "named": false + }, + { + "type": "DECIMAL", + "named": false + }, + { + "type": "DEFAULT", + "named": false + }, + { + "type": "DELETE", + "named": false + }, { "type": "DESC", "named": false }, + { + "type": "DOUBLE", + "named": false + }, { "type": "FALSE", "named": false }, + { + "type": "FLOAT", + "named": false + }, { "type": "FROM", "named": false @@ -514,6 +876,26 @@ "type": "INNER", "named": false }, + { + "type": "INSERT", + "named": false + }, + { + "type": "INT", + "named": false + }, + { + "type": "INTEGER", + "named": false + }, + { + "type": "INTO", + "named": false + }, + { + "type": "IS", + "named": false + }, { "type": "JOIN", "named": false @@ -522,6 +904,10 @@ "type": "LEFT", "named": false }, + { + "type": "LIKE", + "named": false + }, { "type": "LIMIT", "named": false @@ -530,6 +916,14 @@ "type": "NOT", "named": false }, + { + "type": "NOT NULL", + "named": false + }, + { + "type": "NULL", + "named": false + }, { "type": "ON", "named": false @@ -546,6 +940,14 @@ "type": "OUTER", "named": false }, + { + "type": "PRIMARY KEY", + "named": false + }, + { + "type": "REFERENCES", + "named": false + }, { "type": "RIGHT", "named": false @@ -554,20 +956,56 @@ "type": "SELECT", "named": false }, + { + "type": "SET", + "named": false + }, + { + "type": "SMALLINT", + "named": false + }, + { + "type": "TABLE", + "named": false + }, + { + "type": "TEXT", + "named": false + }, + { + "type": "TIMESTAMP", + "named": false + }, { "type": "TRUE", "named": false }, + { + "type": "UNIQUE", + "named": false + }, + { + "type": "UPDATE", + "named": false + }, + { + "type": "VALUES", + "named": false + }, + { + "type": "VARCHAR", + "named": false + }, { "type": "WHERE", "named": false }, { - "type": "identifier", + "type": "alias_token", "named": true }, { - "type": "null", + "type": "identifier", "named": true }, { diff --git a/src/parser.c b/src/parser.c index 2475461..d93bbf3 100644 --- a/src/parser.c +++ b/src/parser.c @@ -4,15 +4,23 @@ #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif +#ifdef _MSC_VER +#pragma optimize("", off) +#elif defined(__clang__) +#pragma clang optimize off +#elif defined(__GNUC__) +#pragma GCC optimize ("O0") +#endif + #define LANGUAGE_VERSION 14 -#define STATE_COUNT 169 +#define STATE_COUNT 331 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 78 +#define SYMBOL_COUNT 122 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 47 +#define TOKEN_COUNT 75 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 0 -#define MAX_ALIAS_SEQUENCE_LENGTH 8 +#define MAX_ALIAS_SEQUENCE_LENGTH 13 #define PRODUCTION_ID_COUNT 1 enum ts_symbol_identifiers { @@ -20,7 +28,7 @@ enum ts_symbol_identifiers { anon_sym_SELECT = 2, anon_sym_STAR = 3, anon_sym_COMMA = 4, - anon_sym_AS = 5, + sym_alias_token = 5, anon_sym_FROM = 6, anon_sym_JOIN = 7, anon_sym_LEFT = 8, @@ -37,62 +45,106 @@ enum ts_symbol_identifiers { anon_sym_ASC = 19, anon_sym_DESC = 20, anon_sym_LIMIT = 21, - anon_sym_AND = 22, - anon_sym_OR = 23, - anon_sym_EQ = 24, - anon_sym_BANG_EQ = 25, - anon_sym_LT_GT = 26, - anon_sym_LT = 27, - anon_sym_LT_EQ = 28, - anon_sym_GT = 29, - anon_sym_GT_EQ = 30, - anon_sym_PLUS = 31, - anon_sym_DASH = 32, - anon_sym_SLASH = 33, - anon_sym_NOT = 34, - anon_sym_LPAREN = 35, - anon_sym_RPAREN = 36, - anon_sym_DOT = 37, - anon_sym_SQUOTE = 38, - aux_sym_string_token1 = 39, - anon_sym_DQUOTE = 40, - aux_sym_string_token2 = 41, - sym_number = 42, - anon_sym_TRUE = 43, - anon_sym_FALSE = 44, - sym_null = 45, - sym_identifier = 46, - sym_source_file = 47, - sym__statement = 48, - sym_select_statement = 49, - sym__select_elements = 50, - sym__select_element = 51, - sym_alias = 52, - sym__from_clause = 53, - sym__table_reference = 54, - sym_join_clause = 55, - sym__where_clause = 56, - sym__group_by_clause = 57, - sym__having_clause = 58, - sym__order_by_clause = 59, - sym_order_by_element = 60, - sym__limit_clause = 61, - sym__expression = 62, - sym_binary_expression = 63, - sym_unary_expression = 64, - sym_parenthesized_expression = 65, - sym_function_call = 66, - sym_column_reference = 67, - sym_table_name = 68, - sym_literal = 69, - sym_string = 70, - sym_boolean = 71, - aux_sym_source_file_repeat1 = 72, - aux_sym__select_elements_repeat1 = 73, - aux_sym__from_clause_repeat1 = 74, - aux_sym_join_clause_repeat1 = 75, - aux_sym__group_by_clause_repeat1 = 76, - aux_sym__order_by_clause_repeat1 = 77, + anon_sym_INSERT = 22, + anon_sym_INTO = 23, + anon_sym_LPAREN = 24, + anon_sym_RPAREN = 25, + anon_sym_VALUES = 26, + anon_sym_UPDATE = 27, + anon_sym_SET = 28, + anon_sym_EQ = 29, + anon_sym_DELETE = 30, + anon_sym_CREATE = 31, + anon_sym_TABLE = 32, + anon_sym_INT = 33, + anon_sym_INTEGER = 34, + anon_sym_BIGINT = 35, + anon_sym_SMALLINT = 36, + anon_sym_VARCHAR = 37, + anon_sym_TEXT = 38, + anon_sym_CHAR = 39, + anon_sym_DATE = 40, + anon_sym_TIMESTAMP = 41, + anon_sym_BOOLEAN = 42, + anon_sym_FLOAT = 43, + anon_sym_DOUBLE = 44, + anon_sym_DECIMAL = 45, + anon_sym_PRIMARYKEY = 46, + anon_sym_NOTNULL = 47, + anon_sym_UNIQUE = 48, + anon_sym_DEFAULT = 49, + anon_sym_REFERENCES = 50, + anon_sym_OR = 51, + anon_sym_AND = 52, + anon_sym_BANG_EQ = 53, + anon_sym_LT_GT = 54, + anon_sym_LT = 55, + anon_sym_LT_EQ = 56, + anon_sym_GT = 57, + anon_sym_GT_EQ = 58, + anon_sym_LIKE = 59, + anon_sym_PLUS = 60, + anon_sym_DASH = 61, + anon_sym_SLASH = 62, + anon_sym_IS = 63, + anon_sym_NULL = 64, + anon_sym_NOT = 65, + anon_sym_DOT = 66, + anon_sym_SQUOTE = 67, + aux_sym_string_token1 = 68, + anon_sym_DQUOTE = 69, + aux_sym_string_token2 = 70, + sym_number = 71, + anon_sym_TRUE = 72, + anon_sym_FALSE = 73, + sym_identifier = 74, + sym_source_file = 75, + sym__statement = 76, + sym_select_statement = 77, + sym__select_elements = 78, + sym__select_element = 79, + sym_alias_suffix = 80, + sym__from_clause = 81, + sym__table_reference = 82, + sym_table_alias = 83, + sym_join_clause = 84, + sym_join_table = 85, + sym_join_list = 86, + sym__where_clause = 87, + sym__group_by_clause = 88, + sym__having_clause = 89, + sym__order_by_clause = 90, + sym_order_by_element = 91, + sym__limit_clause = 92, + sym_insert_statement = 93, + sym_update_statement = 94, + sym_update_assignment = 95, + sym_delete_statement = 96, + sym_create_table_statement = 97, + sym_column_definition = 98, + sym_data_type = 99, + sym_column_constraint = 100, + sym__expression = 101, + sym_binary_expression = 102, + sym_unary_expression = 103, + sym_parenthesized_expression = 104, + sym_function_call = 105, + sym_column_reference = 106, + sym_table_name = 107, + sym_literal = 108, + sym_string = 109, + sym_boolean = 110, + sym_null = 111, + aux_sym_source_file_repeat1 = 112, + aux_sym__select_elements_repeat1 = 113, + aux_sym__from_clause_repeat1 = 114, + aux_sym__group_by_clause_repeat1 = 115, + aux_sym__order_by_clause_repeat1 = 116, + aux_sym_insert_statement_repeat1 = 117, + aux_sym_insert_statement_repeat2 = 118, + aux_sym_update_statement_repeat1 = 119, + aux_sym_create_table_statement_repeat1 = 120, + aux_sym_column_definition_repeat1 = 121, }; static const char * const ts_symbol_names[] = { @@ -101,7 +153,7 @@ static const char * const ts_symbol_names[] = { [anon_sym_SELECT] = "SELECT", [anon_sym_STAR] = "*", [anon_sym_COMMA] = ",", - [anon_sym_AS] = "AS", + [sym_alias_token] = "alias_token", [anon_sym_FROM] = "FROM", [anon_sym_JOIN] = "JOIN", [anon_sym_LEFT] = "LEFT", @@ -118,21 +170,50 @@ static const char * const ts_symbol_names[] = { [anon_sym_ASC] = "ASC", [anon_sym_DESC] = "DESC", [anon_sym_LIMIT] = "LIMIT", - [anon_sym_AND] = "AND", - [anon_sym_OR] = "OR", + [anon_sym_INSERT] = "INSERT", + [anon_sym_INTO] = "INTO", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_VALUES] = "VALUES", + [anon_sym_UPDATE] = "UPDATE", + [anon_sym_SET] = "SET", [anon_sym_EQ] = "=", + [anon_sym_DELETE] = "DELETE", + [anon_sym_CREATE] = "CREATE", + [anon_sym_TABLE] = "TABLE", + [anon_sym_INT] = "INT", + [anon_sym_INTEGER] = "INTEGER", + [anon_sym_BIGINT] = "BIGINT", + [anon_sym_SMALLINT] = "SMALLINT", + [anon_sym_VARCHAR] = "VARCHAR", + [anon_sym_TEXT] = "TEXT", + [anon_sym_CHAR] = "CHAR", + [anon_sym_DATE] = "DATE", + [anon_sym_TIMESTAMP] = "TIMESTAMP", + [anon_sym_BOOLEAN] = "BOOLEAN", + [anon_sym_FLOAT] = "FLOAT", + [anon_sym_DOUBLE] = "DOUBLE", + [anon_sym_DECIMAL] = "DECIMAL", + [anon_sym_PRIMARYKEY] = "PRIMARY KEY", + [anon_sym_NOTNULL] = "NOT NULL", + [anon_sym_UNIQUE] = "UNIQUE", + [anon_sym_DEFAULT] = "DEFAULT", + [anon_sym_REFERENCES] = "REFERENCES", + [anon_sym_OR] = "OR", + [anon_sym_AND] = "AND", [anon_sym_BANG_EQ] = "!=", [anon_sym_LT_GT] = "<>", [anon_sym_LT] = "<", [anon_sym_LT_EQ] = "<=", [anon_sym_GT] = ">", [anon_sym_GT_EQ] = ">=", + [anon_sym_LIKE] = "LIKE", [anon_sym_PLUS] = "+", [anon_sym_DASH] = "-", [anon_sym_SLASH] = "/", + [anon_sym_IS] = "IS", + [anon_sym_NULL] = "NULL", [anon_sym_NOT] = "NOT", - [anon_sym_LPAREN] = "(", - [anon_sym_RPAREN] = ")", [anon_sym_DOT] = ".", [anon_sym_SQUOTE] = "'", [aux_sym_string_token1] = "string_token1", @@ -141,23 +222,33 @@ static const char * const ts_symbol_names[] = { [sym_number] = "number", [anon_sym_TRUE] = "TRUE", [anon_sym_FALSE] = "FALSE", - [sym_null] = "null", [sym_identifier] = "identifier", [sym_source_file] = "source_file", [sym__statement] = "_statement", [sym_select_statement] = "select_statement", [sym__select_elements] = "_select_elements", [sym__select_element] = "_select_element", - [sym_alias] = "alias", + [sym_alias_suffix] = "alias_suffix", [sym__from_clause] = "_from_clause", [sym__table_reference] = "_table_reference", + [sym_table_alias] = "table_alias", [sym_join_clause] = "join_clause", + [sym_join_table] = "join_table", + [sym_join_list] = "join_list", [sym__where_clause] = "_where_clause", [sym__group_by_clause] = "_group_by_clause", [sym__having_clause] = "_having_clause", [sym__order_by_clause] = "_order_by_clause", [sym_order_by_element] = "order_by_element", [sym__limit_clause] = "_limit_clause", + [sym_insert_statement] = "insert_statement", + [sym_update_statement] = "update_statement", + [sym_update_assignment] = "update_assignment", + [sym_delete_statement] = "delete_statement", + [sym_create_table_statement] = "create_table_statement", + [sym_column_definition] = "column_definition", + [sym_data_type] = "data_type", + [sym_column_constraint] = "column_constraint", [sym__expression] = "_expression", [sym_binary_expression] = "binary_expression", [sym_unary_expression] = "unary_expression", @@ -168,12 +259,17 @@ static const char * const ts_symbol_names[] = { [sym_literal] = "literal", [sym_string] = "string", [sym_boolean] = "boolean", + [sym_null] = "null", [aux_sym_source_file_repeat1] = "source_file_repeat1", [aux_sym__select_elements_repeat1] = "_select_elements_repeat1", [aux_sym__from_clause_repeat1] = "_from_clause_repeat1", - [aux_sym_join_clause_repeat1] = "join_clause_repeat1", [aux_sym__group_by_clause_repeat1] = "_group_by_clause_repeat1", [aux_sym__order_by_clause_repeat1] = "_order_by_clause_repeat1", + [aux_sym_insert_statement_repeat1] = "insert_statement_repeat1", + [aux_sym_insert_statement_repeat2] = "insert_statement_repeat2", + [aux_sym_update_statement_repeat1] = "update_statement_repeat1", + [aux_sym_create_table_statement_repeat1] = "create_table_statement_repeat1", + [aux_sym_column_definition_repeat1] = "column_definition_repeat1", }; static const TSSymbol ts_symbol_map[] = { @@ -182,7 +278,7 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_SELECT] = anon_sym_SELECT, [anon_sym_STAR] = anon_sym_STAR, [anon_sym_COMMA] = anon_sym_COMMA, - [anon_sym_AS] = anon_sym_AS, + [sym_alias_token] = sym_alias_token, [anon_sym_FROM] = anon_sym_FROM, [anon_sym_JOIN] = anon_sym_JOIN, [anon_sym_LEFT] = anon_sym_LEFT, @@ -199,21 +295,50 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_ASC] = anon_sym_ASC, [anon_sym_DESC] = anon_sym_DESC, [anon_sym_LIMIT] = anon_sym_LIMIT, - [anon_sym_AND] = anon_sym_AND, - [anon_sym_OR] = anon_sym_OR, + [anon_sym_INSERT] = anon_sym_INSERT, + [anon_sym_INTO] = anon_sym_INTO, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_VALUES] = anon_sym_VALUES, + [anon_sym_UPDATE] = anon_sym_UPDATE, + [anon_sym_SET] = anon_sym_SET, [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_DELETE] = anon_sym_DELETE, + [anon_sym_CREATE] = anon_sym_CREATE, + [anon_sym_TABLE] = anon_sym_TABLE, + [anon_sym_INT] = anon_sym_INT, + [anon_sym_INTEGER] = anon_sym_INTEGER, + [anon_sym_BIGINT] = anon_sym_BIGINT, + [anon_sym_SMALLINT] = anon_sym_SMALLINT, + [anon_sym_VARCHAR] = anon_sym_VARCHAR, + [anon_sym_TEXT] = anon_sym_TEXT, + [anon_sym_CHAR] = anon_sym_CHAR, + [anon_sym_DATE] = anon_sym_DATE, + [anon_sym_TIMESTAMP] = anon_sym_TIMESTAMP, + [anon_sym_BOOLEAN] = anon_sym_BOOLEAN, + [anon_sym_FLOAT] = anon_sym_FLOAT, + [anon_sym_DOUBLE] = anon_sym_DOUBLE, + [anon_sym_DECIMAL] = anon_sym_DECIMAL, + [anon_sym_PRIMARYKEY] = anon_sym_PRIMARYKEY, + [anon_sym_NOTNULL] = anon_sym_NOTNULL, + [anon_sym_UNIQUE] = anon_sym_UNIQUE, + [anon_sym_DEFAULT] = anon_sym_DEFAULT, + [anon_sym_REFERENCES] = anon_sym_REFERENCES, + [anon_sym_OR] = anon_sym_OR, + [anon_sym_AND] = anon_sym_AND, [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, [anon_sym_LT_GT] = anon_sym_LT_GT, [anon_sym_LT] = anon_sym_LT, [anon_sym_LT_EQ] = anon_sym_LT_EQ, [anon_sym_GT] = anon_sym_GT, [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_LIKE] = anon_sym_LIKE, [anon_sym_PLUS] = anon_sym_PLUS, [anon_sym_DASH] = anon_sym_DASH, [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_IS] = anon_sym_IS, + [anon_sym_NULL] = anon_sym_NULL, [anon_sym_NOT] = anon_sym_NOT, - [anon_sym_LPAREN] = anon_sym_LPAREN, - [anon_sym_RPAREN] = anon_sym_RPAREN, [anon_sym_DOT] = anon_sym_DOT, [anon_sym_SQUOTE] = anon_sym_SQUOTE, [aux_sym_string_token1] = aux_sym_string_token1, @@ -222,23 +347,33 @@ static const TSSymbol ts_symbol_map[] = { [sym_number] = sym_number, [anon_sym_TRUE] = anon_sym_TRUE, [anon_sym_FALSE] = anon_sym_FALSE, - [sym_null] = sym_null, [sym_identifier] = sym_identifier, [sym_source_file] = sym_source_file, [sym__statement] = sym__statement, [sym_select_statement] = sym_select_statement, [sym__select_elements] = sym__select_elements, [sym__select_element] = sym__select_element, - [sym_alias] = sym_alias, + [sym_alias_suffix] = sym_alias_suffix, [sym__from_clause] = sym__from_clause, [sym__table_reference] = sym__table_reference, + [sym_table_alias] = sym_table_alias, [sym_join_clause] = sym_join_clause, + [sym_join_table] = sym_join_table, + [sym_join_list] = sym_join_list, [sym__where_clause] = sym__where_clause, [sym__group_by_clause] = sym__group_by_clause, [sym__having_clause] = sym__having_clause, [sym__order_by_clause] = sym__order_by_clause, [sym_order_by_element] = sym_order_by_element, [sym__limit_clause] = sym__limit_clause, + [sym_insert_statement] = sym_insert_statement, + [sym_update_statement] = sym_update_statement, + [sym_update_assignment] = sym_update_assignment, + [sym_delete_statement] = sym_delete_statement, + [sym_create_table_statement] = sym_create_table_statement, + [sym_column_definition] = sym_column_definition, + [sym_data_type] = sym_data_type, + [sym_column_constraint] = sym_column_constraint, [sym__expression] = sym__expression, [sym_binary_expression] = sym_binary_expression, [sym_unary_expression] = sym_unary_expression, @@ -249,12 +384,17 @@ static const TSSymbol ts_symbol_map[] = { [sym_literal] = sym_literal, [sym_string] = sym_string, [sym_boolean] = sym_boolean, + [sym_null] = sym_null, [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, [aux_sym__select_elements_repeat1] = aux_sym__select_elements_repeat1, [aux_sym__from_clause_repeat1] = aux_sym__from_clause_repeat1, - [aux_sym_join_clause_repeat1] = aux_sym_join_clause_repeat1, [aux_sym__group_by_clause_repeat1] = aux_sym__group_by_clause_repeat1, [aux_sym__order_by_clause_repeat1] = aux_sym__order_by_clause_repeat1, + [aux_sym_insert_statement_repeat1] = aux_sym_insert_statement_repeat1, + [aux_sym_insert_statement_repeat2] = aux_sym_insert_statement_repeat2, + [aux_sym_update_statement_repeat1] = aux_sym_update_statement_repeat1, + [aux_sym_create_table_statement_repeat1] = aux_sym_create_table_statement_repeat1, + [aux_sym_column_definition_repeat1] = aux_sym_column_definition_repeat1, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -278,9 +418,9 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_AS] = { + [sym_alias_token] = { .visible = true, - .named = false, + .named = true, }, [anon_sym_FROM] = { .visible = true, @@ -346,11 +486,31 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_AND] = { + [anon_sym_INSERT] = { .visible = true, .named = false, }, - [anon_sym_OR] = { + [anon_sym_INTO] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_VALUES] = { + .visible = true, + .named = false, + }, + [anon_sym_UPDATE] = { + .visible = true, + .named = false, + }, + [anon_sym_SET] = { .visible = true, .named = false, }, @@ -358,6 +518,98 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_DELETE] = { + .visible = true, + .named = false, + }, + [anon_sym_CREATE] = { + .visible = true, + .named = false, + }, + [anon_sym_TABLE] = { + .visible = true, + .named = false, + }, + [anon_sym_INT] = { + .visible = true, + .named = false, + }, + [anon_sym_INTEGER] = { + .visible = true, + .named = false, + }, + [anon_sym_BIGINT] = { + .visible = true, + .named = false, + }, + [anon_sym_SMALLINT] = { + .visible = true, + .named = false, + }, + [anon_sym_VARCHAR] = { + .visible = true, + .named = false, + }, + [anon_sym_TEXT] = { + .visible = true, + .named = false, + }, + [anon_sym_CHAR] = { + .visible = true, + .named = false, + }, + [anon_sym_DATE] = { + .visible = true, + .named = false, + }, + [anon_sym_TIMESTAMP] = { + .visible = true, + .named = false, + }, + [anon_sym_BOOLEAN] = { + .visible = true, + .named = false, + }, + [anon_sym_FLOAT] = { + .visible = true, + .named = false, + }, + [anon_sym_DOUBLE] = { + .visible = true, + .named = false, + }, + [anon_sym_DECIMAL] = { + .visible = true, + .named = false, + }, + [anon_sym_PRIMARYKEY] = { + .visible = true, + .named = false, + }, + [anon_sym_NOTNULL] = { + .visible = true, + .named = false, + }, + [anon_sym_UNIQUE] = { + .visible = true, + .named = false, + }, + [anon_sym_DEFAULT] = { + .visible = true, + .named = false, + }, + [anon_sym_REFERENCES] = { + .visible = true, + .named = false, + }, + [anon_sym_OR] = { + .visible = true, + .named = false, + }, + [anon_sym_AND] = { + .visible = true, + .named = false, + }, [anon_sym_BANG_EQ] = { .visible = true, .named = false, @@ -382,6 +634,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_LIKE] = { + .visible = true, + .named = false, + }, [anon_sym_PLUS] = { .visible = true, .named = false, @@ -394,15 +650,15 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_NOT] = { + [anon_sym_IS] = { .visible = true, .named = false, }, - [anon_sym_LPAREN] = { + [anon_sym_NULL] = { .visible = true, .named = false, }, - [anon_sym_RPAREN] = { + [anon_sym_NOT] = { .visible = true, .named = false, }, @@ -438,10 +694,6 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [sym_null] = { - .visible = true, - .named = true, - }, [sym_identifier] = { .visible = true, .named = true, @@ -466,7 +718,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [sym_alias] = { + [sym_alias_suffix] = { .visible = true, .named = true, }, @@ -478,10 +730,22 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [sym_table_alias] = { + .visible = true, + .named = true, + }, [sym_join_clause] = { .visible = true, .named = true, }, + [sym_join_table] = { + .visible = true, + .named = true, + }, + [sym_join_list] = { + .visible = true, + .named = true, + }, [sym__where_clause] = { .visible = false, .named = true, @@ -506,6 +770,38 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, + [sym_insert_statement] = { + .visible = true, + .named = true, + }, + [sym_update_statement] = { + .visible = true, + .named = true, + }, + [sym_update_assignment] = { + .visible = true, + .named = true, + }, + [sym_delete_statement] = { + .visible = true, + .named = true, + }, + [sym_create_table_statement] = { + .visible = true, + .named = true, + }, + [sym_column_definition] = { + .visible = true, + .named = true, + }, + [sym_data_type] = { + .visible = true, + .named = true, + }, + [sym_column_constraint] = { + .visible = true, + .named = true, + }, [sym__expression] = { .visible = false, .named = true, @@ -546,6 +842,10 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_null] = { + .visible = true, + .named = true, + }, [aux_sym_source_file_repeat1] = { .visible = false, .named = false, @@ -558,15 +858,31 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, - [aux_sym_join_clause_repeat1] = { + [aux_sym__group_by_clause_repeat1] = { .visible = false, .named = false, }, - [aux_sym__group_by_clause_repeat1] = { + [aux_sym__order_by_clause_repeat1] = { .visible = false, .named = false, }, - [aux_sym__order_by_clause_repeat1] = { + [aux_sym_insert_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_insert_statement_repeat2] = { + .visible = false, + .named = false, + }, + [aux_sym_update_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_create_table_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_column_definition_repeat1] = { .visible = false, .named = false, }, @@ -585,7 +901,7 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [1] = 1, [2] = 2, [3] = 3, - [4] = 2, + [4] = 4, [5] = 5, [6] = 6, [7] = 7, @@ -599,82 +915,82 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [15] = 15, [16] = 16, [17] = 17, - [18] = 17, + [18] = 18, [19] = 19, - [20] = 20, - [21] = 21, - [22] = 3, - [23] = 5, - [24] = 6, - [25] = 7, - [26] = 8, - [27] = 9, - [28] = 10, - [29] = 11, - [30] = 12, - [31] = 13, - [32] = 14, - [33] = 15, - [34] = 16, - [35] = 35, - [36] = 36, - [37] = 37, - [38] = 38, - [39] = 39, - [40] = 40, - [41] = 41, + [20] = 2, + [21] = 15, + [22] = 19, + [23] = 23, + [24] = 24, + [25] = 25, + [26] = 2, + [27] = 5, + [28] = 4, + [29] = 3, + [30] = 6, + [31] = 7, + [32] = 8, + [33] = 9, + [34] = 10, + [35] = 11, + [36] = 12, + [37] = 13, + [38] = 14, + [39] = 16, + [40] = 17, + [41] = 18, [42] = 42, - [43] = 43, - [44] = 44, - [45] = 45, - [46] = 40, - [47] = 47, - [48] = 48, - [49] = 49, - [50] = 50, - [51] = 51, - [52] = 52, - [53] = 53, - [54] = 48, - [55] = 47, - [56] = 56, - [57] = 57, - [58] = 58, - [59] = 59, - [60] = 49, - [61] = 50, - [62] = 51, + [43] = 10, + [44] = 3, + [45] = 7, + [46] = 8, + [47] = 9, + [48] = 5, + [49] = 11, + [50] = 18, + [51] = 19, + [52] = 12, + [53] = 15, + [54] = 16, + [55] = 17, + [56] = 4, + [57] = 14, + [58] = 6, + [59] = 13, + [60] = 60, + [61] = 61, + [62] = 62, [63] = 63, [64] = 64, - [65] = 52, - [66] = 21, - [67] = 53, - [68] = 20, - [69] = 58, - [70] = 19, + [65] = 65, + [66] = 66, + [67] = 62, + [68] = 68, + [69] = 23, + [70] = 25, [71] = 71, - [72] = 64, + [72] = 24, [73] = 71, - [74] = 59, + [74] = 71, [75] = 75, [76] = 76, [77] = 77, - [78] = 76, + [78] = 78, [79] = 79, [80] = 80, - [81] = 45, + [81] = 81, [82] = 82, [83] = 83, [84] = 84, - [85] = 85, + [85] = 83, [86] = 86, - [87] = 86, + [87] = 87, [88] = 88, [89] = 89, - [90] = 90, - [91] = 91, - [92] = 92, - [93] = 93, + [90] = 86, + [91] = 87, + [92] = 88, + [93] = 89, [94] = 94, [95] = 95, [96] = 96, @@ -682,56 +998,56 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [98] = 98, [99] = 99, [100] = 100, - [101] = 101, - [102] = 102, - [103] = 103, - [104] = 80, - [105] = 105, - [106] = 106, + [101] = 82, + [102] = 83, + [103] = 86, + [104] = 87, + [105] = 88, + [106] = 89, [107] = 107, - [108] = 105, + [108] = 108, [109] = 109, - [110] = 103, + [110] = 110, [111] = 111, - [112] = 106, + [112] = 112, [113] = 113, - [114] = 84, + [114] = 97, [115] = 115, - [116] = 116, - [117] = 117, - [118] = 118, - [119] = 119, - [120] = 120, - [121] = 121, - [122] = 122, + [116] = 81, + [117] = 95, + [118] = 107, + [119] = 109, + [120] = 112, + [121] = 97, + [122] = 82, [123] = 123, - [124] = 124, + [124] = 80, [125] = 125, [126] = 126, [127] = 127, [128] = 128, [129] = 129, - [130] = 127, + [130] = 96, [131] = 131, [132] = 132, - [133] = 131, - [134] = 129, + [133] = 132, + [134] = 132, [135] = 135, [136] = 136, [137] = 137, - [138] = 101, + [138] = 63, [139] = 139, [140] = 140, - [141] = 141, - [142] = 142, - [143] = 142, + [141] = 140, + [142] = 140, + [143] = 143, [144] = 144, [145] = 145, [146] = 146, [147] = 147, - [148] = 147, + [148] = 148, [149] = 149, - [150] = 149, + [150] = 150, [151] = 151, [152] = 152, [153] = 153, @@ -741,15 +1057,177 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [157] = 157, [158] = 158, [159] = 159, - [160] = 155, + [160] = 160, [161] = 161, - [162] = 152, + [162] = 162, [163] = 163, [164] = 164, - [165] = 159, - [166] = 161, - [167] = 154, - [168] = 158, + [165] = 165, + [166] = 166, + [167] = 167, + [168] = 168, + [169] = 169, + [170] = 170, + [171] = 171, + [172] = 172, + [173] = 173, + [174] = 174, + [175] = 175, + [176] = 176, + [177] = 177, + [178] = 178, + [179] = 179, + [180] = 180, + [181] = 79, + [182] = 182, + [183] = 183, + [184] = 184, + [185] = 185, + [186] = 80, + [187] = 187, + [188] = 188, + [189] = 189, + [190] = 190, + [191] = 191, + [192] = 192, + [193] = 193, + [194] = 194, + [195] = 195, + [196] = 196, + [197] = 96, + [198] = 198, + [199] = 199, + [200] = 200, + [201] = 201, + [202] = 202, + [203] = 195, + [204] = 202, + [205] = 198, + [206] = 206, + [207] = 207, + [208] = 208, + [209] = 135, + [210] = 210, + [211] = 211, + [212] = 212, + [213] = 213, + [214] = 214, + [215] = 215, + [216] = 216, + [217] = 217, + [218] = 218, + [219] = 219, + [220] = 220, + [221] = 221, + [222] = 222, + [223] = 223, + [224] = 224, + [225] = 225, + [226] = 226, + [227] = 227, + [228] = 228, + [229] = 229, + [230] = 230, + [231] = 231, + [232] = 232, + [233] = 233, + [234] = 234, + [235] = 235, + [236] = 236, + [237] = 236, + [238] = 235, + [239] = 232, + [240] = 240, + [241] = 241, + [242] = 242, + [243] = 243, + [244] = 244, + [245] = 245, + [246] = 246, + [247] = 247, + [248] = 248, + [249] = 249, + [250] = 246, + [251] = 251, + [252] = 252, + [253] = 253, + [254] = 254, + [255] = 246, + [256] = 256, + [257] = 257, + [258] = 159, + [259] = 259, + [260] = 260, + [261] = 261, + [262] = 262, + [263] = 263, + [264] = 264, + [265] = 265, + [266] = 266, + [267] = 266, + [268] = 268, + [269] = 269, + [270] = 270, + [271] = 271, + [272] = 272, + [273] = 273, + [274] = 266, + [275] = 275, + [276] = 276, + [277] = 277, + [278] = 278, + [279] = 265, + [280] = 280, + [281] = 281, + [282] = 282, + [283] = 283, + [284] = 284, + [285] = 285, + [286] = 286, + [287] = 287, + [288] = 288, + [289] = 289, + [290] = 290, + [291] = 291, + [292] = 292, + [293] = 293, + [294] = 294, + [295] = 288, + [296] = 296, + [297] = 297, + [298] = 298, + [299] = 299, + [300] = 300, + [301] = 301, + [302] = 286, + [303] = 292, + [304] = 304, + [305] = 287, + [306] = 287, + [307] = 289, + [308] = 308, + [309] = 292, + [310] = 293, + [311] = 311, + [312] = 288, + [313] = 313, + [314] = 289, + [315] = 280, + [316] = 284, + [317] = 317, + [318] = 318, + [319] = 293, + [320] = 320, + [321] = 321, + [322] = 284, + [323] = 323, + [324] = 324, + [325] = 280, + [326] = 326, + [327] = 327, + [328] = 321, + [329] = 304, + [330] = 286, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { @@ -757,855 +1235,3853 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(72); + if (eof) ADVANCE(187); ADVANCE_MAP( - '!', 2, - '"', 115, - '\'', 112, - '(', 109, - ')', 110, - '*', 75, - '+', 104, - ',', 76, - '-', 105, - '.', 111, - '/', 106, - ';', 73, - '<', 100, - '=', 97, - '>', 102, - 'A', 37, - 'B', 68, - 'D', 9, - 'F', 3, - 'G', 54, - 'H', 4, - 'I', 42, - 'J', 46, - 'L', 10, - 'N', 45, - 'O', 39, - 'R', 25, - 'S', 16, - 'T', 50, - 'W', 23, + '!', 5, + '"', 283, + '\'', 280, + '(', 226, + ')', 227, + '*', 191, + '+', 270, + ',', 192, + '-', 271, + '.', 279, + '/', 272, + ';', 188, + '<', 264, + '=', 232, + '>', 266, + 'A', 108, + 'B', 74, + 'C', 70, + 'D', 6, + 'F', 7, + 'G', 144, + 'H', 8, + 'I', 110, + 'J', 125, + 'L', 32, + 'N', 127, + 'O', 111, + 'P', 143, + 'R', 46, + 'S', 33, + 'T', 9, + 'U', 116, + 'V', 10, + 'W', 69, ); if (('\t' <= lookahead && lookahead <= '\r') || lookahead == ' ') SKIP(0); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); END_STATE(); case 1: + if (lookahead == ' ') ADVANCE(85); + END_STATE(); + case 2: + if (lookahead == ' ') ADVANCE(119); + END_STATE(); + case 3: ADVANCE_MAP( - '"', 115, - '\'', 112, - '(', 109, - ')', 110, - '*', 75, - '-', 105, - 'F', 126, - 'N', 132, - 'T', 133, + '"', 283, + '\'', 280, + '(', 226, + ')', 227, + '*', 191, + '-', 271, + 'F', 294, + 'N', 350, + 'T', 359, ); if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(1); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + lookahead == ' ') SKIP(3); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); - END_STATE(); - case 2: - if (lookahead == '=') ADVANCE(98); - END_STATE(); - case 3: - if (lookahead == 'A') ADVANCE(31); - if (lookahead == 'R') ADVANCE(47); - if (lookahead == 'U') ADVANCE(33); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); case 4: - if (lookahead == 'A') ADVANCE(67); + ADVANCE_MAP( + '.', 279, + 'A', 363, + 'F', 377, + 'I', 344, + 'J', 349, + 'L', 310, + 'O', 342, + 'R', 326, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(4); + if (('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); case 5: - if (lookahead == 'C') ADVANCE(92); + if (lookahead == '=') ADVANCE(262); END_STATE(); case 6: - if (lookahead == 'C') ADVANCE(91); + if (lookahead == 'A') ADVANCE(164); + if (lookahead == 'E') ADVANCE(29); + if (lookahead == 'O') ADVANCE(177); END_STATE(); case 7: - if (lookahead == 'C') ADVANCE(62); + if (lookahead == 'A') ADVANCE(86); + if (lookahead == 'L') ADVANCE(131); + if (lookahead == 'R') ADVANCE(128); + if (lookahead == 'U') ADVANCE(92); END_STATE(); case 8: - if (lookahead == 'D') ADVANCE(94); + if (lookahead == 'A') ADVANCE(178); END_STATE(); case 9: - if (lookahead == 'E') ADVANCE(56); + if (lookahead == 'A') ADVANCE(22); + if (lookahead == 'E') ADVANCE(179); + if (lookahead == 'I') ADVANCE(105); + if (lookahead == 'R') ADVANCE(172); END_STATE(); case 10: - if (lookahead == 'E') ADVANCE(20); - if (lookahead == 'I') ADVANCE(36); + if (lookahead == 'A') ADVANCE(101); END_STATE(); case 11: - if (lookahead == 'E') ADVANCE(120); + if (lookahead == 'A') ADVANCE(136); END_STATE(); case 12: - if (lookahead == 'E') ADVANCE(122); + if (lookahead == 'A') ADVANCE(173); END_STATE(); case 13: - if (lookahead == 'E') ADVANCE(86); + if (lookahead == 'A') ADVANCE(104); END_STATE(); case 14: - if (lookahead == 'E') ADVANCE(7); + if (lookahead == 'A') ADVANCE(114); END_STATE(); case 15: - if (lookahead == 'E') ADVANCE(55); + if (lookahead == 'A') ADVANCE(155); END_STATE(); case 16: - if (lookahead == 'E') ADVANCE(32); + if (lookahead == 'A') ADVANCE(140); END_STATE(); case 17: - if (lookahead == 'E') ADVANCE(51); + if (lookahead == 'A') ADVANCE(89); END_STATE(); case 18: - if (lookahead == 'E') ADVANCE(52); + if (lookahead == 'A') ADVANCE(142); END_STATE(); case 19: - if (lookahead == 'E') ADVANCE(53); + if (lookahead == 'A') ADVANCE(167); END_STATE(); case 20: - if (lookahead == 'F') ADVANCE(59); + if (lookahead == 'A') ADVANCE(95); END_STATE(); case 21: - if (lookahead == 'G') ADVANCE(89); + if (lookahead == 'A') ADVANCE(169); END_STATE(); case 22: - if (lookahead == 'G') ADVANCE(24); + if (lookahead == 'B') ADVANCE(96); END_STATE(); case 23: - if (lookahead == 'H') ADVANCE(15); + if (lookahead == 'B') ADVANCE(99); END_STATE(); case 24: - if (lookahead == 'H') ADVANCE(61); + if (lookahead == 'C') ADVANCE(220); END_STATE(); case 25: - if (lookahead == 'I') ADVANCE(22); + if (lookahead == 'C') ADVANCE(219); END_STATE(); case 26: - if (lookahead == 'I') ADVANCE(41); + if (lookahead == 'C') ADVANCE(72); END_STATE(); case 27: - if (lookahead == 'I') ADVANCE(43); + if (lookahead == 'C') ADVANCE(160); END_STATE(); case 28: - if (lookahead == 'I') ADVANCE(60); + if (lookahead == 'C') ADVANCE(52); END_STATE(); case 29: - if (lookahead == 'L') ADVANCE(84); + if (lookahead == 'C') ADVANCE(82); + if (lookahead == 'F') ADVANCE(12); + if (lookahead == 'L') ADVANCE(62); + if (lookahead == 'S') ADVANCE(24); END_STATE(); case 30: - if (lookahead == 'L') ADVANCE(124); + if (lookahead == 'D') ADVANCE(260); END_STATE(); case 31: - if (lookahead == 'L') ADVANCE(57); + if (lookahead == 'D') ADVANCE(21); END_STATE(); case 32: - if (lookahead == 'L') ADVANCE(14); + if (lookahead == 'E') ADVANCE(63); + if (lookahead == 'I') ADVANCE(84); END_STATE(); case 33: - if (lookahead == 'L') ADVANCE(29); + if (lookahead == 'E') ADVANCE(94); + if (lookahead == 'M') ADVANCE(20); END_STATE(); case 34: - if (lookahead == 'L') ADVANCE(30); + if (lookahead == 'E') ADVANCE(179); + if (lookahead == 'I') ADVANCE(105); END_STATE(); case 35: - if (lookahead == 'M') ADVANCE(78); + if (lookahead == 'E') ADVANCE(246); END_STATE(); case 36: - if (lookahead == 'M') ADVANCE(28); + if (lookahead == 'E') ADVANCE(268); END_STATE(); case 37: - if (lookahead == 'N') ADVANCE(8); - if (lookahead == 'S') ADVANCE(77); + if (lookahead == 'E') ADVANCE(288); END_STATE(); case 38: - if (lookahead == 'N') ADVANCE(8); - if (lookahead == 'S') ADVANCE(6); + if (lookahead == 'E') ADVANCE(290); END_STATE(); case 39: - if (lookahead == 'N') ADVANCE(85); - if (lookahead == 'R') ADVANCE(96); - if (lookahead == 'U') ADVANCE(63); + if (lookahead == 'E') ADVANCE(237); END_STATE(); case 40: - if (lookahead == 'N') ADVANCE(85); - if (lookahead == 'R') ADVANCE(95); + if (lookahead == 'E') ADVANCE(210); END_STATE(); case 41: - if (lookahead == 'N') ADVANCE(79); + if (lookahead == 'E') ADVANCE(235); END_STATE(); case 42: - if (lookahead == 'N') ADVANCE(44); + if (lookahead == 'E') ADVANCE(233); END_STATE(); case 43: - if (lookahead == 'N') ADVANCE(21); + if (lookahead == 'E') ADVANCE(250); END_STATE(); case 44: - if (lookahead == 'N') ADVANCE(17); + if (lookahead == 'E') ADVANCE(254); END_STATE(); case 45: - if (lookahead == 'O') ADVANCE(58); - if (lookahead == 'U') ADVANCE(34); + if (lookahead == 'E') ADVANCE(229); END_STATE(); case 46: - if (lookahead == 'O') ADVANCE(26); + if (lookahead == 'E') ADVANCE(64); + if (lookahead == 'I') ADVANCE(66); END_STATE(); case 47: - if (lookahead == 'O') ADVANCE(35); + if (lookahead == 'E') ADVANCE(151); END_STATE(); case 48: - if (lookahead == 'O') ADVANCE(64); + if (lookahead == 'E') ADVANCE(181); END_STATE(); case 49: - if (lookahead == 'P') ADVANCE(87); + if (lookahead == 'E') ADVANCE(27); END_STATE(); case 50: - if (lookahead == 'R') ADVANCE(66); + if (lookahead == 'E') ADVANCE(148); END_STATE(); case 51: - if (lookahead == 'R') ADVANCE(83); + if (lookahead == 'E') ADVANCE(146); END_STATE(); case 52: - if (lookahead == 'R') ADVANCE(90); + if (lookahead == 'E') ADVANCE(149); END_STATE(); case 53: - if (lookahead == 'R') ADVANCE(81); + if (lookahead == 'E') ADVANCE(137); END_STATE(); case 54: - if (lookahead == 'R') ADVANCE(48); + if (lookahead == 'E') ADVANCE(19); END_STATE(); case 55: - if (lookahead == 'R') ADVANCE(13); + if (lookahead == 'E') ADVANCE(118); END_STATE(); case 56: - if (lookahead == 'S') ADVANCE(5); + if (lookahead == 'E') ADVANCE(145); END_STATE(); case 57: - if (lookahead == 'S') ADVANCE(12); + if (lookahead == 'E') ADVANCE(138); END_STATE(); case 58: - if (lookahead == 'T') ADVANCE(107); + if (lookahead == 'E') ADVANCE(139); END_STATE(); case 59: - if (lookahead == 'T') ADVANCE(80); + if (lookahead == 'E') ADVANCE(14); END_STATE(); case 60: - if (lookahead == 'T') ADVANCE(93); + if (lookahead == 'E') ADVANCE(141); END_STATE(); case 61: - if (lookahead == 'T') ADVANCE(82); + if (lookahead == 'E') ADVANCE(147); END_STATE(); case 62: - if (lookahead == 'T') ADVANCE(74); + if (lookahead == 'E') ADVANCE(168); END_STATE(); case 63: - if (lookahead == 'T') ADVANCE(19); + if (lookahead == 'F') ADVANCE(153); END_STATE(); case 64: - if (lookahead == 'U') ADVANCE(49); + if (lookahead == 'F') ADVANCE(61); END_STATE(); case 65: - if (lookahead == 'U') ADVANCE(33); + if (lookahead == 'G') ADVANCE(215); END_STATE(); case 66: - if (lookahead == 'U') ADVANCE(11); + if (lookahead == 'G') ADVANCE(71); END_STATE(); case 67: - if (lookahead == 'V') ADVANCE(27); + if (lookahead == 'G') ADVANCE(77); END_STATE(); case 68: - if (lookahead == 'Y') ADVANCE(88); + if (lookahead == 'G') ADVANCE(60); END_STATE(); case 69: - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(69); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + if (lookahead == 'H') ADVANCE(51); END_STATE(); case 70: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(119); + if (lookahead == 'H') ADVANCE(11); + if (lookahead == 'R') ADVANCE(54); END_STATE(); case 71: - if (eof) ADVANCE(72); - ADVANCE_MAP( - '!', 2, - '(', 109, - ')', 110, - '*', 75, - '+', 104, - ',', 76, - '-', 105, - '.', 111, - '/', 106, - ';', 73, - '<', 100, - '=', 97, - '>', 102, - 'A', 38, - 'D', 9, - 'F', 65, - 'I', 42, - 'J', 46, - 'L', 10, - 'O', 40, - 'R', 25, - 'S', 16, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(71); + if (lookahead == 'H') ADVANCE(157); END_STATE(); case 72: - ACCEPT_TOKEN(ts_builtin_sym_end); + if (lookahead == 'H') ADVANCE(18); END_STATE(); case 73: - ACCEPT_TOKEN(anon_sym_SEMI); + if (lookahead == 'I') ADVANCE(67); + if (lookahead == 'O') ADVANCE(130); END_STATE(); case 74: - ACCEPT_TOKEN(anon_sym_SELECT); + if (lookahead == 'I') ADVANCE(67); + if (lookahead == 'O') ADVANCE(130); + if (lookahead == 'Y') ADVANCE(214); END_STATE(); case 75: - ACCEPT_TOKEN(anon_sym_STAR); + if (lookahead == 'I') ADVANCE(113); END_STATE(); case 76: - ACCEPT_TOKEN(anon_sym_COMMA); + if (lookahead == 'I') ADVANCE(135); END_STATE(); case 77: - ACCEPT_TOKEN(anon_sym_AS); + if (lookahead == 'I') ADVANCE(120); END_STATE(); case 78: - ACCEPT_TOKEN(anon_sym_FROM); + if (lookahead == 'I') ADVANCE(106); END_STATE(); case 79: - ACCEPT_TOKEN(anon_sym_JOIN); + if (lookahead == 'I') ADVANCE(117); END_STATE(); case 80: - ACCEPT_TOKEN(anon_sym_LEFT); + if (lookahead == 'I') ADVANCE(156); END_STATE(); case 81: - ACCEPT_TOKEN(anon_sym_OUTER); + if (lookahead == 'I') ADVANCE(121); END_STATE(); case 82: - ACCEPT_TOKEN(anon_sym_RIGHT); + if (lookahead == 'I') ADVANCE(107); END_STATE(); case 83: - ACCEPT_TOKEN(anon_sym_INNER); + if (lookahead == 'I') ADVANCE(122); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(83); END_STATE(); case 84: - ACCEPT_TOKEN(anon_sym_FULL); + if (lookahead == 'K') ADVANCE(36); + if (lookahead == 'M') ADVANCE(80); END_STATE(); case 85: - ACCEPT_TOKEN(anon_sym_ON); + if (lookahead == 'K') ADVANCE(48); END_STATE(); case 86: - ACCEPT_TOKEN(anon_sym_WHERE); + if (lookahead == 'L') ADVANCE(150); END_STATE(); case 87: - ACCEPT_TOKEN(anon_sym_GROUP); + if (lookahead == 'L') ADVANCE(206); END_STATE(); case 88: - ACCEPT_TOKEN(anon_sym_BY); + if (lookahead == 'L') ADVANCE(275); END_STATE(); case 89: - ACCEPT_TOKEN(anon_sym_HAVING); + if (lookahead == 'L') ADVANCE(251); END_STATE(); case 90: - ACCEPT_TOKEN(anon_sym_ORDER); + if (lookahead == 'L') ADVANCE(253); END_STATE(); case 91: - ACCEPT_TOKEN(anon_sym_ASC); + if (lookahead == 'L') ADVANCE(131); + if (lookahead == 'U') ADVANCE(92); END_STATE(); case 92: - ACCEPT_TOKEN(anon_sym_DESC); + if (lookahead == 'L') ADVANCE(87); END_STATE(); case 93: - ACCEPT_TOKEN(anon_sym_LIMIT); + if (lookahead == 'L') ADVANCE(88); END_STATE(); case 94: - ACCEPT_TOKEN(anon_sym_AND); + if (lookahead == 'L') ADVANCE(49); + if (lookahead == 'T') ADVANCE(231); END_STATE(); case 95: - ACCEPT_TOKEN(anon_sym_OR); + if (lookahead == 'L') ADVANCE(102); END_STATE(); case 96: - ACCEPT_TOKEN(anon_sym_OR); - if (lookahead == 'D') ADVANCE(18); + if (lookahead == 'L') ADVANCE(39); END_STATE(); case 97: - ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == 'L') ADVANCE(90); END_STATE(); case 98: - ACCEPT_TOKEN(anon_sym_BANG_EQ); + if (lookahead == 'L') ADVANCE(161); END_STATE(); case 99: - ACCEPT_TOKEN(anon_sym_LT_GT); + if (lookahead == 'L') ADVANCE(43); END_STATE(); case 100: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '=') ADVANCE(101); - if (lookahead == '>') ADVANCE(99); + if (lookahead == 'L') ADVANCE(59); END_STATE(); case 101: - ACCEPT_TOKEN(anon_sym_LT_EQ); + if (lookahead == 'L') ADVANCE(174); + if (lookahead == 'R') ADVANCE(26); END_STATE(); case 102: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(103); + if (lookahead == 'L') ADVANCE(81); END_STATE(); case 103: - ACCEPT_TOKEN(anon_sym_GT_EQ); + if (lookahead == 'M') ADVANCE(195); END_STATE(); case 104: - ACCEPT_TOKEN(anon_sym_PLUS); + if (lookahead == 'M') ADVANCE(134); END_STATE(); case 105: - ACCEPT_TOKEN(anon_sym_DASH); + if (lookahead == 'M') ADVANCE(47); END_STATE(); case 106: - ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == 'M') ADVANCE(16); END_STATE(); case 107: - ACCEPT_TOKEN(anon_sym_NOT); + if (lookahead == 'M') ADVANCE(17); END_STATE(); case 108: - ACCEPT_TOKEN(anon_sym_NOT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + if (lookahead == 'N') ADVANCE(30); + if (lookahead == 'S') ADVANCE(193); END_STATE(); case 109: - ACCEPT_TOKEN(anon_sym_LPAREN); + if (lookahead == 'N') ADVANCE(30); + if (lookahead == 'S') ADVANCE(25); END_STATE(); case 110: - ACCEPT_TOKEN(anon_sym_RPAREN); + if (lookahead == 'N') ADVANCE(123); + if (lookahead == 'S') ADVANCE(273); END_STATE(); case 111: - ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == 'N') ADVANCE(208); + if (lookahead == 'R') ADVANCE(259); + if (lookahead == 'U') ADVANCE(170); END_STATE(); case 112: - ACCEPT_TOKEN(anon_sym_SQUOTE); + if (lookahead == 'N') ADVANCE(208); + if (lookahead == 'R') ADVANCE(257); END_STATE(); case 113: - ACCEPT_TOKEN(aux_sym_string_token1); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(113); - if (lookahead != 0 && - lookahead != '\'') ADVANCE(114); + if (lookahead == 'N') ADVANCE(197); END_STATE(); case 114: - ACCEPT_TOKEN(aux_sym_string_token1); - if (lookahead != 0 && - lookahead != '\'') ADVANCE(114); + if (lookahead == 'N') ADVANCE(248); END_STATE(); case 115: - ACCEPT_TOKEN(anon_sym_DQUOTE); + if (lookahead == 'N') ADVANCE(124); + if (lookahead == 'S') ADVANCE(273); END_STATE(); case 116: - ACCEPT_TOKEN(aux_sym_string_token2); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(116); - if (lookahead != 0 && - lookahead != '"') ADVANCE(117); + if (lookahead == 'N') ADVANCE(76); + if (lookahead == 'P') ADVANCE(31); END_STATE(); case 117: - ACCEPT_TOKEN(aux_sym_string_token2); - if (lookahead != 0 && - lookahead != '"') ADVANCE(117); + if (lookahead == 'N') ADVANCE(65); END_STATE(); case 118: - ACCEPT_TOKEN(sym_number); - if (lookahead == '.') ADVANCE(70); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(118); + if (lookahead == 'N') ADVANCE(28); END_STATE(); case 119: - ACCEPT_TOKEN(sym_number); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(119); + if (lookahead == 'N') ADVANCE(176); END_STATE(); case 120: - ACCEPT_TOKEN(anon_sym_TRUE); + if (lookahead == 'N') ADVANCE(158); END_STATE(); case 121: - ACCEPT_TOKEN(anon_sym_TRUE); + if (lookahead == 'N') ADVANCE(162); + END_STATE(); + case 122: + if (lookahead == 'N') ADVANCE(165); + END_STATE(); + case 123: + if (lookahead == 'N') ADVANCE(53); + if (lookahead == 'S') ADVANCE(56); + if (lookahead == 'T') ADVANCE(239); + END_STATE(); + case 124: + if (lookahead == 'N') ADVANCE(53); + if (lookahead == 'S') ADVANCE(56); + if (lookahead == 'T') ADVANCE(238); + END_STATE(); + case 125: + if (lookahead == 'O') ADVANCE(75); + END_STATE(); + case 126: + if (lookahead == 'O') ADVANCE(225); + END_STATE(); + case 127: + if (lookahead == 'O') ADVANCE(152); + if (lookahead == 'U') ADVANCE(93); + END_STATE(); + case 128: + if (lookahead == 'O') ADVANCE(103); + END_STATE(); + case 129: + if (lookahead == 'O') ADVANCE(171); + END_STATE(); + case 130: + if (lookahead == 'O') ADVANCE(100); + END_STATE(); + case 131: + if (lookahead == 'O') ADVANCE(15); + END_STATE(); + case 132: + if (lookahead == 'O') ADVANCE(163); + END_STATE(); + case 133: + if (lookahead == 'P') ADVANCE(212); + END_STATE(); + case 134: + if (lookahead == 'P') ADVANCE(247); + END_STATE(); + case 135: + if (lookahead == 'Q') ADVANCE(175); + END_STATE(); + case 136: + if (lookahead == 'R') ADVANCE(245); + END_STATE(); + case 137: + if (lookahead == 'R') ADVANCE(204); + END_STATE(); + case 138: + if (lookahead == 'R') ADVANCE(217); + END_STATE(); + case 139: + if (lookahead == 'R') ADVANCE(201); + END_STATE(); + case 140: + if (lookahead == 'R') ADVANCE(180); + END_STATE(); + case 141: + if (lookahead == 'R') ADVANCE(240); + END_STATE(); + case 142: + if (lookahead == 'R') ADVANCE(243); + END_STATE(); + case 143: + if (lookahead == 'R') ADVANCE(78); + END_STATE(); + case 144: + if (lookahead == 'R') ADVANCE(129); + END_STATE(); + case 145: + if (lookahead == 'R') ADVANCE(159); + END_STATE(); + case 146: + if (lookahead == 'R') ADVANCE(40); + END_STATE(); + case 147: + if (lookahead == 'R') ADVANCE(55); + END_STATE(); + case 148: + if (lookahead == 'S') ADVANCE(228); + END_STATE(); + case 149: + if (lookahead == 'S') ADVANCE(256); + END_STATE(); + case 150: + if (lookahead == 'S') ADVANCE(38); + END_STATE(); + case 151: + if (lookahead == 'S') ADVANCE(166); + END_STATE(); + case 152: + if (lookahead == 'T') ADVANCE(277); + END_STATE(); + case 153: + if (lookahead == 'T') ADVANCE(199); + END_STATE(); + case 154: + if (lookahead == 'T') ADVANCE(244); + END_STATE(); + case 155: + if (lookahead == 'T') ADVANCE(249); + END_STATE(); + case 156: + if (lookahead == 'T') ADVANCE(221); + END_STATE(); + case 157: + if (lookahead == 'T') ADVANCE(202); + END_STATE(); + case 158: + if (lookahead == 'T') ADVANCE(241); + END_STATE(); + case 159: + if (lookahead == 'T') ADVANCE(223); + END_STATE(); + case 160: + if (lookahead == 'T') ADVANCE(189); + END_STATE(); + case 161: + if (lookahead == 'T') ADVANCE(255); + END_STATE(); + case 162: + if (lookahead == 'T') ADVANCE(242); + END_STATE(); + case 163: + if (lookahead == 'T') ADVANCE(2); + END_STATE(); + case 164: + if (lookahead == 'T') ADVANCE(35); + END_STATE(); + case 165: + if (lookahead == 'T') ADVANCE(126); + END_STATE(); + case 166: + if (lookahead == 'T') ADVANCE(13); + END_STATE(); + case 167: + if (lookahead == 'T') ADVANCE(41); + END_STATE(); + case 168: + if (lookahead == 'T') ADVANCE(42); + END_STATE(); + case 169: + if (lookahead == 'T') ADVANCE(45); + END_STATE(); + case 170: + if (lookahead == 'T') ADVANCE(58); + END_STATE(); + case 171: + if (lookahead == 'U') ADVANCE(133); + END_STATE(); + case 172: + if (lookahead == 'U') ADVANCE(37); + END_STATE(); + case 173: + if (lookahead == 'U') ADVANCE(98); + END_STATE(); + case 174: + if (lookahead == 'U') ADVANCE(50); + END_STATE(); + case 175: + if (lookahead == 'U') ADVANCE(44); + END_STATE(); + case 176: + if (lookahead == 'U') ADVANCE(97); + END_STATE(); + case 177: + if (lookahead == 'U') ADVANCE(23); + END_STATE(); + case 178: + if (lookahead == 'V') ADVANCE(79); + END_STATE(); + case 179: + if (lookahead == 'X') ADVANCE(154); + END_STATE(); + case 180: + if (lookahead == 'Y') ADVANCE(1); + END_STATE(); + case 181: + if (lookahead == 'Y') ADVANCE(252); + END_STATE(); + case 182: + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(182); + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 183: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(287); + END_STATE(); + case 184: + if (eof) ADVANCE(187); + ADVANCE_MAP( + '!', 5, + '(', 226, + ')', 227, + '*', 191, + '+', 270, + ',', 192, + '-', 271, + '.', 279, + '/', 272, + ';', 188, + '<', 264, + '=', 232, + '>', 266, + 'A', 109, + 'B', 73, + 'C', 70, + 'D', 6, + 'F', 91, + 'I', 115, + 'J', 125, + 'L', 32, + 'N', 132, + 'O', 112, + 'P', 143, + 'R', 46, + 'S', 33, + 'T', 34, + 'U', 116, + 'V', 10, + 'W', 69, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(184); + END_STATE(); + case 185: + if (eof) ADVANCE(187); + ADVANCE_MAP( + '!', 5, + '(', 226, + '*', 191, + '+', 270, + ',', 192, + '-', 271, + '.', 279, + '/', 272, + ';', 188, + '<', 264, + '=', 232, + '>', 266, + 'A', 338, + 'C', 357, + 'D', 300, + 'F', 353, + 'G', 358, + 'H', 292, + 'I', 339, + 'L', 323, + 'O', 354, + 'S', 316, + 'U', 352, + 'W', 321, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(185); + if (('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 186: + if (eof) ADVANCE(187); + ADVANCE_MAP( + ',', 192, + '.', 279, + ';', 188, + 'A', 363, + 'C', 357, + 'D', 300, + 'F', 377, + 'G', 358, + 'H', 292, + 'I', 343, + 'J', 349, + 'L', 309, + 'O', 360, + 'R', 326, + 'S', 316, + 'U', 352, + 'W', 321, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(186); + if (('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 187: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 188: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 189: + ACCEPT_TOKEN(anon_sym_SELECT); + END_STATE(); + case 190: + ACCEPT_TOKEN(anon_sym_SELECT); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 122: - ACCEPT_TOKEN(anon_sym_FALSE); + case 191: + ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); - case 123: - ACCEPT_TOKEN(anon_sym_FALSE); + case 192: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 193: + ACCEPT_TOKEN(sym_alias_token); + END_STATE(); + case 194: + ACCEPT_TOKEN(sym_alias_token); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 124: - ACCEPT_TOKEN(sym_null); + case 195: + ACCEPT_TOKEN(anon_sym_FROM); END_STATE(); - case 125: - ACCEPT_TOKEN(sym_null); + case 196: + ACCEPT_TOKEN(anon_sym_FROM); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 126: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'A') ADVANCE(129); + case 197: + ACCEPT_TOKEN(anon_sym_JOIN); + END_STATE(); + case 198: + ACCEPT_TOKEN(anon_sym_JOIN); if (('0' <= lookahead && lookahead <= '9') || - ('B' <= lookahead && lookahead <= 'Z') || + ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 127: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(121); + case 199: + ACCEPT_TOKEN(anon_sym_LEFT); + END_STATE(); + case 200: + ACCEPT_TOKEN(anon_sym_LEFT); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 128: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(123); + case 201: + ACCEPT_TOKEN(anon_sym_OUTER); + END_STATE(); + case 202: + ACCEPT_TOKEN(anon_sym_RIGHT); + END_STATE(); + case 203: + ACCEPT_TOKEN(anon_sym_RIGHT); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 129: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(134); + case 204: + ACCEPT_TOKEN(anon_sym_INNER); + END_STATE(); + case 205: + ACCEPT_TOKEN(anon_sym_INNER); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 130: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(125); + case 206: + ACCEPT_TOKEN(anon_sym_FULL); + END_STATE(); + case 207: + ACCEPT_TOKEN(anon_sym_FULL); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 131: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(130); + case 208: + ACCEPT_TOKEN(anon_sym_ON); + END_STATE(); + case 209: + ACCEPT_TOKEN(anon_sym_ON); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 132: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'O') ADVANCE(135); - if (lookahead == 'U') ADVANCE(131); + case 210: + ACCEPT_TOKEN(anon_sym_WHERE); + END_STATE(); + case 211: + ACCEPT_TOKEN(anon_sym_WHERE); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 133: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(136); + case 212: + ACCEPT_TOKEN(anon_sym_GROUP); + END_STATE(); + case 213: + ACCEPT_TOKEN(anon_sym_GROUP); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 134: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'S') ADVANCE(128); + case 214: + ACCEPT_TOKEN(anon_sym_BY); + END_STATE(); + case 215: + ACCEPT_TOKEN(anon_sym_HAVING); + END_STATE(); + case 216: + ACCEPT_TOKEN(anon_sym_HAVING); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 135: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(108); + case 217: + ACCEPT_TOKEN(anon_sym_ORDER); + END_STATE(); + case 218: + ACCEPT_TOKEN(anon_sym_ORDER); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 136: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'U') ADVANCE(127); + case 219: + ACCEPT_TOKEN(anon_sym_ASC); + END_STATE(); + case 220: + ACCEPT_TOKEN(anon_sym_DESC); + END_STATE(); + case 221: + ACCEPT_TOKEN(anon_sym_LIMIT); + END_STATE(); + case 222: + ACCEPT_TOKEN(anon_sym_LIMIT); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - case 137: - ACCEPT_TOKEN(sym_identifier); + case 223: + ACCEPT_TOKEN(anon_sym_INSERT); + END_STATE(); + case 224: + ACCEPT_TOKEN(anon_sym_INSERT); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); END_STATE(); - default: - return false; - } -} - -static const TSLexMode ts_lex_modes[STATE_COUNT] = { - [0] = {.lex_state = 0}, - [1] = {.lex_state = 0}, - [2] = {.lex_state = 0}, - [3] = {.lex_state = 0}, - [4] = {.lex_state = 71}, - [5] = {.lex_state = 0}, - [6] = {.lex_state = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 0}, - [9] = {.lex_state = 0}, - [10] = {.lex_state = 0}, - [11] = {.lex_state = 0}, - [12] = {.lex_state = 0}, - [13] = {.lex_state = 0}, - [14] = {.lex_state = 0}, - [15] = {.lex_state = 0}, - [16] = {.lex_state = 0}, - [17] = {.lex_state = 0}, - [18] = {.lex_state = 71}, - [19] = {.lex_state = 0}, - [20] = {.lex_state = 0}, - [21] = {.lex_state = 0}, - [22] = {.lex_state = 71}, - [23] = {.lex_state = 71}, - [24] = {.lex_state = 71}, - [25] = {.lex_state = 71}, - [26] = {.lex_state = 71}, - [27] = {.lex_state = 71}, - [28] = {.lex_state = 71}, - [29] = {.lex_state = 71}, - [30] = {.lex_state = 71}, - [31] = {.lex_state = 71}, - [32] = {.lex_state = 71}, - [33] = {.lex_state = 71}, - [34] = {.lex_state = 71}, - [35] = {.lex_state = 0}, - [36] = {.lex_state = 0}, - [37] = {.lex_state = 1}, - [38] = {.lex_state = 0}, - [39] = {.lex_state = 1}, - [40] = {.lex_state = 1}, - [41] = {.lex_state = 1}, - [42] = {.lex_state = 0}, - [43] = {.lex_state = 1}, - [44] = {.lex_state = 71}, - [45] = {.lex_state = 0}, - [46] = {.lex_state = 1}, - [47] = {.lex_state = 1}, - [48] = {.lex_state = 1}, - [49] = {.lex_state = 1}, - [50] = {.lex_state = 1}, - [51] = {.lex_state = 1}, - [52] = {.lex_state = 1}, - [53] = {.lex_state = 1}, - [54] = {.lex_state = 1}, - [55] = {.lex_state = 1}, - [56] = {.lex_state = 1}, - [57] = {.lex_state = 1}, - [58] = {.lex_state = 1}, - [59] = {.lex_state = 1}, - [60] = {.lex_state = 1}, - [61] = {.lex_state = 1}, - [62] = {.lex_state = 1}, - [63] = {.lex_state = 1}, - [64] = {.lex_state = 1}, - [65] = {.lex_state = 1}, - [66] = {.lex_state = 71}, - [67] = {.lex_state = 1}, - [68] = {.lex_state = 71}, - [69] = {.lex_state = 1}, - [70] = {.lex_state = 71}, - [71] = {.lex_state = 1}, - [72] = {.lex_state = 1}, - [73] = {.lex_state = 1}, - [74] = {.lex_state = 1}, - [75] = {.lex_state = 0}, - [76] = {.lex_state = 71}, - [77] = {.lex_state = 0}, - [78] = {.lex_state = 71}, - [79] = {.lex_state = 0}, - [80] = {.lex_state = 0}, - [81] = {.lex_state = 71}, - [82] = {.lex_state = 0}, - [83] = {.lex_state = 0}, - [84] = {.lex_state = 0}, - [85] = {.lex_state = 0}, - [86] = {.lex_state = 71}, - [87] = {.lex_state = 71}, - [88] = {.lex_state = 0}, - [89] = {.lex_state = 0}, - [90] = {.lex_state = 0}, - [91] = {.lex_state = 0}, - [92] = {.lex_state = 0}, - [93] = {.lex_state = 0}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 0}, - [96] = {.lex_state = 0}, - [97] = {.lex_state = 0}, - [98] = {.lex_state = 0}, - [99] = {.lex_state = 0}, - [100] = {.lex_state = 0}, - [101] = {.lex_state = 0}, - [102] = {.lex_state = 0}, - [103] = {.lex_state = 0}, - [104] = {.lex_state = 0}, - [105] = {.lex_state = 0}, - [106] = {.lex_state = 0}, - [107] = {.lex_state = 0}, - [108] = {.lex_state = 0}, - [109] = {.lex_state = 0}, - [110] = {.lex_state = 0}, - [111] = {.lex_state = 0}, - [112] = {.lex_state = 0}, - [113] = {.lex_state = 0}, - [114] = {.lex_state = 0}, - [115] = {.lex_state = 0}, - [116] = {.lex_state = 0}, - [117] = {.lex_state = 0}, - [118] = {.lex_state = 0}, - [119] = {.lex_state = 0}, - [120] = {.lex_state = 0}, - [121] = {.lex_state = 0}, - [122] = {.lex_state = 0}, - [123] = {.lex_state = 0}, - [124] = {.lex_state = 0}, - [125] = {.lex_state = 0}, - [126] = {.lex_state = 0}, - [127] = {.lex_state = 69}, - [128] = {.lex_state = 69}, - [129] = {.lex_state = 69}, - [130] = {.lex_state = 69}, - [131] = {.lex_state = 69}, - [132] = {.lex_state = 69}, - [133] = {.lex_state = 69}, - [134] = {.lex_state = 69}, - [135] = {.lex_state = 0}, - [136] = {.lex_state = 0}, - [137] = {.lex_state = 0}, - [138] = {.lex_state = 0}, - [139] = {.lex_state = 0}, - [140] = {.lex_state = 0}, - [141] = {.lex_state = 0}, - [142] = {.lex_state = 0}, - [143] = {.lex_state = 0}, - [144] = {.lex_state = 0}, - [145] = {.lex_state = 0}, - [146] = {.lex_state = 0}, - [147] = {.lex_state = 0}, - [148] = {.lex_state = 0}, - [149] = {.lex_state = 0}, - [150] = {.lex_state = 0}, - [151] = {.lex_state = 69}, - [152] = {.lex_state = 69}, - [153] = {.lex_state = 0}, - [154] = {.lex_state = 0}, - [155] = {.lex_state = 116}, - [156] = {.lex_state = 0}, - [157] = {.lex_state = 0}, - [158] = {.lex_state = 0}, - [159] = {.lex_state = 113}, - [160] = {.lex_state = 116}, - [161] = {.lex_state = 0}, - [162] = {.lex_state = 69}, - [163] = {.lex_state = 0}, - [164] = {.lex_state = 69}, - [165] = {.lex_state = 113}, - [166] = {.lex_state = 0}, - [167] = {.lex_state = 0}, - [168] = {.lex_state = 0}, -}; - -static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { - [ts_builtin_sym_end] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), - [anon_sym_SELECT] = ACTIONS(1), - [anon_sym_STAR] = ACTIONS(1), - [anon_sym_COMMA] = ACTIONS(1), - [anon_sym_AS] = ACTIONS(1), - [anon_sym_FROM] = ACTIONS(1), - [anon_sym_JOIN] = ACTIONS(1), - [anon_sym_LEFT] = ACTIONS(1), - [anon_sym_OUTER] = ACTIONS(1), - [anon_sym_RIGHT] = ACTIONS(1), - [anon_sym_INNER] = ACTIONS(1), - [anon_sym_FULL] = ACTIONS(1), - [anon_sym_ON] = ACTIONS(1), - [anon_sym_WHERE] = ACTIONS(1), - [anon_sym_GROUP] = ACTIONS(1), - [anon_sym_BY] = ACTIONS(1), - [anon_sym_HAVING] = ACTIONS(1), - [anon_sym_ORDER] = ACTIONS(1), - [anon_sym_DESC] = ACTIONS(1), - [anon_sym_LIMIT] = ACTIONS(1), - [anon_sym_AND] = ACTIONS(1), - [anon_sym_OR] = ACTIONS(1), - [anon_sym_EQ] = ACTIONS(1), - [anon_sym_BANG_EQ] = ACTIONS(1), - [anon_sym_LT_GT] = ACTIONS(1), - [anon_sym_LT] = ACTIONS(1), - [anon_sym_LT_EQ] = ACTIONS(1), - [anon_sym_GT] = ACTIONS(1), - [anon_sym_GT_EQ] = ACTIONS(1), - [anon_sym_PLUS] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), - [anon_sym_SLASH] = ACTIONS(1), - [anon_sym_NOT] = ACTIONS(1), + case 225: + ACCEPT_TOKEN(anon_sym_INTO); + END_STATE(); + case 226: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 227: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 228: + ACCEPT_TOKEN(anon_sym_VALUES); + END_STATE(); + case 229: + ACCEPT_TOKEN(anon_sym_UPDATE); + END_STATE(); + case 230: + ACCEPT_TOKEN(anon_sym_UPDATE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 231: + ACCEPT_TOKEN(anon_sym_SET); + END_STATE(); + case 232: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 233: + ACCEPT_TOKEN(anon_sym_DELETE); + END_STATE(); + case 234: + ACCEPT_TOKEN(anon_sym_DELETE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 235: + ACCEPT_TOKEN(anon_sym_CREATE); + END_STATE(); + case 236: + ACCEPT_TOKEN(anon_sym_CREATE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 237: + ACCEPT_TOKEN(anon_sym_TABLE); + END_STATE(); + case 238: + ACCEPT_TOKEN(anon_sym_INT); + if (lookahead == 'E') ADVANCE(68); + END_STATE(); + case 239: + ACCEPT_TOKEN(anon_sym_INT); + if (lookahead == 'E') ADVANCE(68); + if (lookahead == 'O') ADVANCE(225); + END_STATE(); + case 240: + ACCEPT_TOKEN(anon_sym_INTEGER); + END_STATE(); + case 241: + ACCEPT_TOKEN(anon_sym_BIGINT); + END_STATE(); + case 242: + ACCEPT_TOKEN(anon_sym_SMALLINT); + END_STATE(); + case 243: + ACCEPT_TOKEN(anon_sym_VARCHAR); + END_STATE(); + case 244: + ACCEPT_TOKEN(anon_sym_TEXT); + END_STATE(); + case 245: + ACCEPT_TOKEN(anon_sym_CHAR); + END_STATE(); + case 246: + ACCEPT_TOKEN(anon_sym_DATE); + END_STATE(); + case 247: + ACCEPT_TOKEN(anon_sym_TIMESTAMP); + END_STATE(); + case 248: + ACCEPT_TOKEN(anon_sym_BOOLEAN); + END_STATE(); + case 249: + ACCEPT_TOKEN(anon_sym_FLOAT); + END_STATE(); + case 250: + ACCEPT_TOKEN(anon_sym_DOUBLE); + END_STATE(); + case 251: + ACCEPT_TOKEN(anon_sym_DECIMAL); + END_STATE(); + case 252: + ACCEPT_TOKEN(anon_sym_PRIMARYKEY); + END_STATE(); + case 253: + ACCEPT_TOKEN(anon_sym_NOTNULL); + END_STATE(); + case 254: + ACCEPT_TOKEN(anon_sym_UNIQUE); + END_STATE(); + case 255: + ACCEPT_TOKEN(anon_sym_DEFAULT); + END_STATE(); + case 256: + ACCEPT_TOKEN(anon_sym_REFERENCES); + END_STATE(); + case 257: + ACCEPT_TOKEN(anon_sym_OR); + END_STATE(); + case 258: + ACCEPT_TOKEN(anon_sym_OR); + if (lookahead == 'D') ADVANCE(313); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 259: + ACCEPT_TOKEN(anon_sym_OR); + if (lookahead == 'D') ADVANCE(57); + END_STATE(); + case 260: + ACCEPT_TOKEN(anon_sym_AND); + END_STATE(); + case 261: + ACCEPT_TOKEN(anon_sym_AND); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 262: + ACCEPT_TOKEN(anon_sym_BANG_EQ); + END_STATE(); + case 263: + ACCEPT_TOKEN(anon_sym_LT_GT); + END_STATE(); + case 264: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '=') ADVANCE(265); + if (lookahead == '>') ADVANCE(263); + END_STATE(); + case 265: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 266: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(267); + END_STATE(); + case 267: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 268: + ACCEPT_TOKEN(anon_sym_LIKE); + END_STATE(); + case 269: + ACCEPT_TOKEN(anon_sym_LIKE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 270: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 271: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 272: + ACCEPT_TOKEN(anon_sym_SLASH); + END_STATE(); + case 273: + ACCEPT_TOKEN(anon_sym_IS); + END_STATE(); + case 274: + ACCEPT_TOKEN(anon_sym_IS); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 275: + ACCEPT_TOKEN(anon_sym_NULL); + END_STATE(); + case 276: + ACCEPT_TOKEN(anon_sym_NULL); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 277: + ACCEPT_TOKEN(anon_sym_NOT); + END_STATE(); + case 278: + ACCEPT_TOKEN(anon_sym_NOT); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 279: + ACCEPT_TOKEN(anon_sym_DOT); + END_STATE(); + case 280: + ACCEPT_TOKEN(anon_sym_SQUOTE); + END_STATE(); + case 281: + ACCEPT_TOKEN(aux_sym_string_token1); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(281); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(282); + END_STATE(); + case 282: + ACCEPT_TOKEN(aux_sym_string_token1); + if (lookahead != 0 && + lookahead != '\'') ADVANCE(282); + END_STATE(); + case 283: + ACCEPT_TOKEN(anon_sym_DQUOTE); + END_STATE(); + case 284: + ACCEPT_TOKEN(aux_sym_string_token2); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(284); + if (lookahead != 0 && + lookahead != '"') ADVANCE(285); + END_STATE(); + case 285: + ACCEPT_TOKEN(aux_sym_string_token2); + if (lookahead != 0 && + lookahead != '"') ADVANCE(285); + END_STATE(); + case 286: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(183); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); + END_STATE(); + case 287: + ACCEPT_TOKEN(sym_number); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(287); + END_STATE(); + case 288: + ACCEPT_TOKEN(anon_sym_TRUE); + END_STATE(); + case 289: + ACCEPT_TOKEN(anon_sym_TRUE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 290: + ACCEPT_TOKEN(anon_sym_FALSE); + END_STATE(); + case 291: + ACCEPT_TOKEN(anon_sym_FALSE); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 292: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'A') ADVANCE(378); + if (('0' <= lookahead && lookahead <= '9') || + ('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 293: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'A') ADVANCE(372); + if (('0' <= lookahead && lookahead <= '9') || + ('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 294: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'A') ADVANCE(335); + if (('0' <= lookahead && lookahead <= '9') || + ('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 295: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'A') ADVANCE(374); + if (('0' <= lookahead && lookahead <= '9') || + ('B' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 296: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'C') ADVANCE(368); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 297: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'D') ADVANCE(261); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 298: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'D') ADVANCE(313); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 299: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'D') ADVANCE(295); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 300: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(331); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 301: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(269); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 302: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(296); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 303: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(211); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 304: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(236); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 305: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(234); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 306: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(230); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 307: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(289); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 308: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(291); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 309: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(318); + if (lookahead == 'I') ADVANCE(337); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 310: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(318); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 311: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(293); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 312: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(361); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 313: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(355); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 314: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(356); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 315: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(362); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 316: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(334); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 317: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(373); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 318: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'F') ADVANCE(370); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 319: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'G') ADVANCE(216); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 320: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'G') ADVANCE(322); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 321: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'H') ADVANCE(315); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 322: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'H') ADVANCE(371); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 323: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(328); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 324: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(340); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 325: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(366); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 326: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(320); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 327: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(341); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 328: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'K') ADVANCE(301); + if (lookahead == 'M') ADVANCE(325); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 329: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(276); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 330: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(207); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 331: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(317); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 332: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(329); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 333: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(330); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 334: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(302); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 335: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'L') ADVANCE(365); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 336: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'M') ADVANCE(196); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 337: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'M') ADVANCE(325); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 338: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(297); + if (lookahead == 'S') ADVANCE(194); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 339: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(364); + if (lookahead == 'S') ADVANCE(274); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 340: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(319); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 341: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(198); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 342: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(209); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 343: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(345); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 344: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(346); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 345: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(314); + if (lookahead == 'S') ADVANCE(312); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 346: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(314); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 347: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(336); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 348: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(375); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 349: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(327); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 350: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(369); + if (lookahead == 'U') ADVANCE(332); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 351: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'P') ADVANCE(213); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 352: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'P') ADVANCE(299); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 353: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(347); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 354: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(258); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 355: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(218); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 356: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(205); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 357: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(311); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 358: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(348); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 359: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(376); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 360: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(298); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 361: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(367); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 362: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(303); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 363: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'S') ADVANCE(194); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 364: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'S') ADVANCE(312); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 365: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'S') ADVANCE(308); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 366: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 367: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(224); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 368: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(190); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 369: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(278); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 370: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(200); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 371: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(203); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 372: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(304); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 373: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(305); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 374: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'T') ADVANCE(306); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 375: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'U') ADVANCE(351); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 376: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'U') ADVANCE(307); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 377: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'U') ADVANCE(333); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 378: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'V') ADVANCE(324); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + case 379: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); + END_STATE(); + default: + return false; + } +} + +static const TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 184}, + [3] = {.lex_state = 184}, + [4] = {.lex_state = 184}, + [5] = {.lex_state = 184}, + [6] = {.lex_state = 184}, + [7] = {.lex_state = 184}, + [8] = {.lex_state = 184}, + [9] = {.lex_state = 184}, + [10] = {.lex_state = 184}, + [11] = {.lex_state = 184}, + [12] = {.lex_state = 184}, + [13] = {.lex_state = 184}, + [14] = {.lex_state = 184}, + [15] = {.lex_state = 184}, + [16] = {.lex_state = 184}, + [17] = {.lex_state = 184}, + [18] = {.lex_state = 184}, + [19] = {.lex_state = 184}, + [20] = {.lex_state = 0}, + [21] = {.lex_state = 0}, + [22] = {.lex_state = 0}, + [23] = {.lex_state = 0}, + [24] = {.lex_state = 0}, + [25] = {.lex_state = 0}, + [26] = {.lex_state = 185}, + [27] = {.lex_state = 0}, + [28] = {.lex_state = 0}, + [29] = {.lex_state = 0}, + [30] = {.lex_state = 0}, + [31] = {.lex_state = 0}, + [32] = {.lex_state = 0}, + [33] = {.lex_state = 0}, + [34] = {.lex_state = 0}, + [35] = {.lex_state = 0}, + [36] = {.lex_state = 0}, + [37] = {.lex_state = 0}, + [38] = {.lex_state = 0}, + [39] = {.lex_state = 0}, + [40] = {.lex_state = 0}, + [41] = {.lex_state = 0}, + [42] = {.lex_state = 185}, + [43] = {.lex_state = 185}, + [44] = {.lex_state = 185}, + [45] = {.lex_state = 185}, + [46] = {.lex_state = 185}, + [47] = {.lex_state = 185}, + [48] = {.lex_state = 185}, + [49] = {.lex_state = 185}, + [50] = {.lex_state = 185}, + [51] = {.lex_state = 185}, + [52] = {.lex_state = 185}, + [53] = {.lex_state = 185}, + [54] = {.lex_state = 185}, + [55] = {.lex_state = 185}, + [56] = {.lex_state = 185}, + [57] = {.lex_state = 185}, + [58] = {.lex_state = 185}, + [59] = {.lex_state = 185}, + [60] = {.lex_state = 0}, + [61] = {.lex_state = 184}, + [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, + [64] = {.lex_state = 184}, + [65] = {.lex_state = 0}, + [66] = {.lex_state = 3}, + [67] = {.lex_state = 184}, + [68] = {.lex_state = 184}, + [69] = {.lex_state = 184}, + [70] = {.lex_state = 184}, + [71] = {.lex_state = 3}, + [72] = {.lex_state = 184}, + [73] = {.lex_state = 3}, + [74] = {.lex_state = 3}, + [75] = {.lex_state = 3}, + [76] = {.lex_state = 3}, + [77] = {.lex_state = 3}, + [78] = {.lex_state = 0}, + [79] = {.lex_state = 186}, + [80] = {.lex_state = 186}, + [81] = {.lex_state = 3}, + [82] = {.lex_state = 3}, + [83] = {.lex_state = 3}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 3}, + [86] = {.lex_state = 3}, + [87] = {.lex_state = 3}, + [88] = {.lex_state = 3}, + [89] = {.lex_state = 3}, + [90] = {.lex_state = 3}, + [91] = {.lex_state = 3}, + [92] = {.lex_state = 3}, + [93] = {.lex_state = 3}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 3}, + [96] = {.lex_state = 186}, + [97] = {.lex_state = 3}, + [98] = {.lex_state = 3}, + [99] = {.lex_state = 3}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 3}, + [102] = {.lex_state = 3}, + [103] = {.lex_state = 3}, + [104] = {.lex_state = 3}, + [105] = {.lex_state = 3}, + [106] = {.lex_state = 3}, + [107] = {.lex_state = 3}, + [108] = {.lex_state = 3}, + [109] = {.lex_state = 3}, + [110] = {.lex_state = 3}, + [111] = {.lex_state = 3}, + [112] = {.lex_state = 3}, + [113] = {.lex_state = 3}, + [114] = {.lex_state = 3}, + [115] = {.lex_state = 3}, + [116] = {.lex_state = 3}, + [117] = {.lex_state = 3}, + [118] = {.lex_state = 3}, + [119] = {.lex_state = 3}, + [120] = {.lex_state = 3}, + [121] = {.lex_state = 3}, + [122] = {.lex_state = 3}, + [123] = {.lex_state = 3}, + [124] = {.lex_state = 184}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 184}, + [130] = {.lex_state = 184}, + [131] = {.lex_state = 184}, + [132] = {.lex_state = 184}, + [133] = {.lex_state = 184}, + [134] = {.lex_state = 184}, + [135] = {.lex_state = 0}, + [136] = {.lex_state = 184}, + [137] = {.lex_state = 184}, + [138] = {.lex_state = 184}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 184}, + [141] = {.lex_state = 184}, + [142] = {.lex_state = 184}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 184}, + [150] = {.lex_state = 0}, + [151] = {.lex_state = 0}, + [152] = {.lex_state = 0}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0}, + [155] = {.lex_state = 0}, + [156] = {.lex_state = 0}, + [157] = {.lex_state = 0}, + [158] = {.lex_state = 0}, + [159] = {.lex_state = 0}, + [160] = {.lex_state = 0}, + [161] = {.lex_state = 0}, + [162] = {.lex_state = 0}, + [163] = {.lex_state = 0}, + [164] = {.lex_state = 0}, + [165] = {.lex_state = 0}, + [166] = {.lex_state = 0}, + [167] = {.lex_state = 0}, + [168] = {.lex_state = 0}, + [169] = {.lex_state = 0}, + [170] = {.lex_state = 0}, + [171] = {.lex_state = 0}, + [172] = {.lex_state = 0}, + [173] = {.lex_state = 0}, + [174] = {.lex_state = 0}, + [175] = {.lex_state = 0}, + [176] = {.lex_state = 0}, + [177] = {.lex_state = 0}, + [178] = {.lex_state = 0}, + [179] = {.lex_state = 0}, + [180] = {.lex_state = 184}, + [181] = {.lex_state = 4}, + [182] = {.lex_state = 0}, + [183] = {.lex_state = 0}, + [184] = {.lex_state = 0}, + [185] = {.lex_state = 0}, + [186] = {.lex_state = 4}, + [187] = {.lex_state = 0}, + [188] = {.lex_state = 184}, + [189] = {.lex_state = 0}, + [190] = {.lex_state = 0}, + [191] = {.lex_state = 0}, + [192] = {.lex_state = 0}, + [193] = {.lex_state = 184}, + [194] = {.lex_state = 0}, + [195] = {.lex_state = 0}, + [196] = {.lex_state = 0}, + [197] = {.lex_state = 4}, + [198] = {.lex_state = 0}, + [199] = {.lex_state = 0}, + [200] = {.lex_state = 184}, + [201] = {.lex_state = 184}, + [202] = {.lex_state = 0}, + [203] = {.lex_state = 0}, + [204] = {.lex_state = 0}, + [205] = {.lex_state = 0}, + [206] = {.lex_state = 0}, + [207] = {.lex_state = 0}, + [208] = {.lex_state = 184}, + [209] = {.lex_state = 0}, + [210] = {.lex_state = 184}, + [211] = {.lex_state = 0}, + [212] = {.lex_state = 0}, + [213] = {.lex_state = 0}, + [214] = {.lex_state = 0}, + [215] = {.lex_state = 0}, + [216] = {.lex_state = 0}, + [217] = {.lex_state = 0}, + [218] = {.lex_state = 0}, + [219] = {.lex_state = 0}, + [220] = {.lex_state = 184}, + [221] = {.lex_state = 0}, + [222] = {.lex_state = 0}, + [223] = {.lex_state = 0}, + [224] = {.lex_state = 184}, + [225] = {.lex_state = 0}, + [226] = {.lex_state = 0}, + [227] = {.lex_state = 0}, + [228] = {.lex_state = 0}, + [229] = {.lex_state = 0}, + [230] = {.lex_state = 0}, + [231] = {.lex_state = 0}, + [232] = {.lex_state = 182}, + [233] = {.lex_state = 182}, + [234] = {.lex_state = 182}, + [235] = {.lex_state = 182}, + [236] = {.lex_state = 182}, + [237] = {.lex_state = 182}, + [238] = {.lex_state = 182}, + [239] = {.lex_state = 182}, + [240] = {.lex_state = 0}, + [241] = {.lex_state = 0}, + [242] = {.lex_state = 0}, + [243] = {.lex_state = 0}, + [244] = {.lex_state = 0}, + [245] = {.lex_state = 0}, + [246] = {.lex_state = 0}, + [247] = {.lex_state = 0}, + [248] = {.lex_state = 0}, + [249] = {.lex_state = 0}, + [250] = {.lex_state = 0}, + [251] = {.lex_state = 0}, + [252] = {.lex_state = 0}, + [253] = {.lex_state = 0}, + [254] = {.lex_state = 0}, + [255] = {.lex_state = 0}, + [256] = {.lex_state = 0}, + [257] = {.lex_state = 0}, + [258] = {.lex_state = 0}, + [259] = {.lex_state = 0}, + [260] = {.lex_state = 0}, + [261] = {.lex_state = 182}, + [262] = {.lex_state = 0}, + [263] = {.lex_state = 0}, + [264] = {.lex_state = 182}, + [265] = {.lex_state = 0}, + [266] = {.lex_state = 0}, + [267] = {.lex_state = 0}, + [268] = {.lex_state = 0}, + [269] = {.lex_state = 182}, + [270] = {.lex_state = 0}, + [271] = {.lex_state = 182}, + [272] = {.lex_state = 0}, + [273] = {.lex_state = 182}, + [274] = {.lex_state = 0}, + [275] = {.lex_state = 182}, + [276] = {.lex_state = 182}, + [277] = {.lex_state = 182}, + [278] = {.lex_state = 182}, + [279] = {.lex_state = 0}, + [280] = {.lex_state = 281}, + [281] = {.lex_state = 0}, + [282] = {.lex_state = 182}, + [283] = {.lex_state = 0}, + [284] = {.lex_state = 284}, + [285] = {.lex_state = 0}, + [286] = {.lex_state = 0}, + [287] = {.lex_state = 0}, + [288] = {.lex_state = 0}, + [289] = {.lex_state = 182}, + [290] = {.lex_state = 182}, + [291] = {.lex_state = 0}, + [292] = {.lex_state = 182}, + [293] = {.lex_state = 0}, + [294] = {.lex_state = 0}, + [295] = {.lex_state = 0}, + [296] = {.lex_state = 0}, + [297] = {.lex_state = 0}, + [298] = {.lex_state = 182}, + [299] = {.lex_state = 0}, + [300] = {.lex_state = 0}, + [301] = {.lex_state = 182}, + [302] = {.lex_state = 0}, + [303] = {.lex_state = 182}, + [304] = {.lex_state = 0}, + [305] = {.lex_state = 0}, + [306] = {.lex_state = 0}, + [307] = {.lex_state = 182}, + [308] = {.lex_state = 0}, + [309] = {.lex_state = 182}, + [310] = {.lex_state = 0}, + [311] = {.lex_state = 0}, + [312] = {.lex_state = 0}, + [313] = {.lex_state = 0}, + [314] = {.lex_state = 182}, + [315] = {.lex_state = 281}, + [316] = {.lex_state = 284}, + [317] = {.lex_state = 182}, + [318] = {.lex_state = 0}, + [319] = {.lex_state = 0}, + [320] = {.lex_state = 83}, + [321] = {.lex_state = 0}, + [322] = {.lex_state = 284}, + [323] = {.lex_state = 182}, + [324] = {.lex_state = 0}, + [325] = {.lex_state = 281}, + [326] = {.lex_state = 0}, + [327] = {.lex_state = 0}, + [328] = {.lex_state = 0}, + [329] = {.lex_state = 0}, + [330] = {.lex_state = 0}, +}; + +static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_SELECT] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [sym_alias_token] = ACTIONS(1), + [anon_sym_FROM] = ACTIONS(1), + [anon_sym_JOIN] = ACTIONS(1), + [anon_sym_LEFT] = ACTIONS(1), + [anon_sym_OUTER] = ACTIONS(1), + [anon_sym_RIGHT] = ACTIONS(1), + [anon_sym_INNER] = ACTIONS(1), + [anon_sym_FULL] = ACTIONS(1), + [anon_sym_ON] = ACTIONS(1), + [anon_sym_WHERE] = ACTIONS(1), + [anon_sym_GROUP] = ACTIONS(1), + [anon_sym_BY] = ACTIONS(1), + [anon_sym_HAVING] = ACTIONS(1), + [anon_sym_ORDER] = ACTIONS(1), + [anon_sym_DESC] = ACTIONS(1), + [anon_sym_LIMIT] = ACTIONS(1), + [anon_sym_INSERT] = ACTIONS(1), + [anon_sym_INTO] = ACTIONS(1), [anon_sym_LPAREN] = ACTIONS(1), [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_VALUES] = ACTIONS(1), + [anon_sym_UPDATE] = ACTIONS(1), + [anon_sym_SET] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_DELETE] = ACTIONS(1), + [anon_sym_CREATE] = ACTIONS(1), + [anon_sym_TABLE] = ACTIONS(1), + [anon_sym_INT] = ACTIONS(1), + [anon_sym_INTEGER] = ACTIONS(1), + [anon_sym_BIGINT] = ACTIONS(1), + [anon_sym_SMALLINT] = ACTIONS(1), + [anon_sym_VARCHAR] = ACTIONS(1), + [anon_sym_TEXT] = ACTIONS(1), + [anon_sym_CHAR] = ACTIONS(1), + [anon_sym_DATE] = ACTIONS(1), + [anon_sym_TIMESTAMP] = ACTIONS(1), + [anon_sym_BOOLEAN] = ACTIONS(1), + [anon_sym_FLOAT] = ACTIONS(1), + [anon_sym_DOUBLE] = ACTIONS(1), + [anon_sym_DECIMAL] = ACTIONS(1), + [anon_sym_PRIMARYKEY] = ACTIONS(1), + [anon_sym_UNIQUE] = ACTIONS(1), + [anon_sym_DEFAULT] = ACTIONS(1), + [anon_sym_REFERENCES] = ACTIONS(1), + [anon_sym_OR] = ACTIONS(1), + [anon_sym_AND] = ACTIONS(1), + [anon_sym_BANG_EQ] = ACTIONS(1), + [anon_sym_LT_GT] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_LIKE] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_IS] = ACTIONS(1), + [anon_sym_NULL] = ACTIONS(1), + [anon_sym_NOT] = ACTIONS(1), [anon_sym_DOT] = ACTIONS(1), [anon_sym_SQUOTE] = ACTIONS(1), [anon_sym_DQUOTE] = ACTIONS(1), [sym_number] = ACTIONS(1), [anon_sym_TRUE] = ACTIONS(1), [anon_sym_FALSE] = ACTIONS(1), - [sym_null] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(153), - [sym__statement] = STATE(124), - [sym_select_statement] = STATE(135), - [aux_sym_source_file_repeat1] = STATE(124), + [sym_source_file] = STATE(318), + [sym__statement] = STATE(157), + [sym_select_statement] = STATE(213), + [sym_insert_statement] = STATE(213), + [sym_update_statement] = STATE(213), + [sym_delete_statement] = STATE(213), + [sym_create_table_statement] = STATE(213), + [aux_sym_source_file_repeat1] = STATE(157), [ts_builtin_sym_end] = ACTIONS(3), [anon_sym_SELECT] = ACTIONS(5), + [anon_sym_INSERT] = ACTIONS(7), + [anon_sym_UPDATE] = ACTIONS(9), + [anon_sym_DELETE] = ACTIONS(11), + [anon_sym_CREATE] = ACTIONS(13), }, }; static const uint16_t ts_small_parse_table[] = { [0] = 4, - ACTIONS(11), 1, + ACTIONS(17), 1, + anon_sym_LPAREN, + ACTIONS(21), 1, + anon_sym_DOT, + ACTIONS(19), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(15), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [50] = 2, + ACTIONS(25), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(23), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [94] = 2, + ACTIONS(29), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(27), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [138] = 2, + ACTIONS(33), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(31), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [182] = 2, + ACTIONS(37), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(35), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [226] = 2, + ACTIONS(41), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(39), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [270] = 2, + ACTIONS(45), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [314] = 2, + ACTIONS(49), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(47), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [358] = 2, + ACTIONS(53), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(51), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [402] = 2, + ACTIONS(57), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(55), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [446] = 4, + ACTIONS(57), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(55), 33, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_IS, + [494] = 7, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(55), 25, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + [548] = 6, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(55), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + [600] = 3, + ACTIONS(57), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(55), 35, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_IS, + [646] = 2, + ACTIONS(57), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(55), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [690] = 2, + ACTIONS(73), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(71), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [734] = 2, + ACTIONS(77), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(75), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [778] = 2, + ACTIONS(81), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(79), 37, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_ASC, + anon_sym_DESC, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_RPAREN, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + anon_sym_OR, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [822] = 4, + ACTIONS(83), 1, + anon_sym_LPAREN, + ACTIONS(85), 1, + anon_sym_DOT, + ACTIONS(19), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(15), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [866] = 3, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(57), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(55), 28, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_IS, + [906] = 2, + ACTIONS(81), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(79), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [944] = 8, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, + anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(89), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [994] = 8, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, + anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(103), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [1044] = 8, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, + anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(105), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [1094] = 4, + ACTIONS(107), 1, anon_sym_LPAREN, - ACTIONS(13), 1, + ACTIONS(109), 1, anon_sym_DOT, - ACTIONS(9), 3, + ACTIONS(15), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(19), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, + anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1136] = 2, + ACTIONS(33), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(31), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1174] = 2, + ACTIONS(29), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(27), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1212] = 2, + ACTIONS(25), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(23), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1250] = 2, + ACTIONS(37), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(35), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1288] = 2, + ACTIONS(41), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(39), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1326] = 2, + ACTIONS(45), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(43), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1364] = 2, + ACTIONS(49), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(47), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1402] = 2, + ACTIONS(53), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(51), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1440] = 2, + ACTIONS(57), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(55), 30, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1478] = 4, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(57), 3, + anon_sym_OR, + anon_sym_LT, + anon_sym_GT, + ACTIONS(55), 26, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_IS, + [1520] = 8, + ACTIONS(57), 1, + anon_sym_OR, + ACTIONS(95), 1, + anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(55), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [1570] = 7, + ACTIONS(57), 1, + anon_sym_OR, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(55), 19, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, + [1618] = 2, + ACTIONS(57), 3, anon_sym_OR, anon_sym_LT, anon_sym_GT, - ACTIONS(7), 26, + ACTIONS(55), 30, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, @@ -1616,28 +5092,32 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, + anon_sym_INSERT, + anon_sym_UPDATE, anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, + anon_sym_LIKE, anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [40] = 2, - ACTIONS(17), 3, + anon_sym_IS, + [1656] = 2, + ACTIONS(73), 3, anon_sym_OR, anon_sym_LT, anon_sym_GT, - ACTIONS(15), 26, + ACTIONS(71), 30, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, @@ -1648,24 +5128,27 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, + anon_sym_INSERT, + anon_sym_UPDATE, anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_AND, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, + anon_sym_LIKE, anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [74] = 4, - ACTIONS(19), 1, - anon_sym_LPAREN, - ACTIONS(21), 1, - anon_sym_DOT, - ACTIONS(9), 2, + anon_sym_IS, + [1694] = 2, + ACTIONS(77), 3, + anon_sym_OR, anon_sym_LT, anon_sym_GT, - ACTIONS(7), 25, + ACTIONS(75), 30, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, @@ -1676,12 +5159,77 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_EQ, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_AND, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + anon_sym_IS, + [1732] = 12, + ACTIONS(117), 1, + sym_alias_token, + ACTIONS(121), 1, anon_sym_OR, + ACTIONS(123), 1, + anon_sym_AND, + ACTIONS(129), 1, + anon_sym_IS, + ACTIONS(131), 1, + sym_identifier, + STATE(152), 1, + sym_alias_suffix, + ACTIONS(115), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(127), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(111), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + ACTIONS(125), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + ACTIONS(119), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(113), 11, + anon_sym_SELECT, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [1789] = 2, + ACTIONS(51), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1690,31 +5238,66 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - anon_sym_RPAREN, - [112] = 2, - ACTIONS(25), 3, + ACTIONS(53), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(23), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1825] = 2, + ACTIONS(23), 12, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(25), 19, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1861] = 2, + ACTIONS(39), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1723,30 +5306,100 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [146] = 2, - ACTIONS(29), 3, + ACTIONS(41), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(27), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1897] = 2, + ACTIONS(43), 12, ts_builtin_sym_end, anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(45), 19, anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, + anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1933] = 2, + ACTIONS(47), 12, + ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(49), 19, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [1969] = 2, + ACTIONS(31), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1755,30 +5408,100 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [180] = 2, - ACTIONS(33), 3, + ACTIONS(33), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(31), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2005] = 2, + ACTIONS(55), 12, ts_builtin_sym_end, anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(57), 19, anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, + anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2041] = 2, + ACTIONS(75), 12, + ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(77), 19, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2077] = 2, + ACTIONS(79), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1787,30 +5510,103 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [214] = 2, - ACTIONS(37), 3, + ACTIONS(81), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(35), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2113] = 4, + ACTIONS(115), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(127), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(55), 8, ts_builtin_sym_end, anon_sym_SEMI, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(57), 19, anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, + anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2153] = 3, + ACTIONS(115), 2, anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(55), 10, + ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_COMMA, - anon_sym_AS, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(57), 19, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2191] = 2, + ACTIONS(55), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1819,30 +5615,66 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [248] = 2, - ACTIONS(41), 3, + ACTIONS(57), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(39), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2227] = 2, + ACTIONS(71), 12, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_SLASH, + ACTIONS(73), 19, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2263] = 2, + ACTIONS(27), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1851,30 +5683,71 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [282] = 2, - ACTIONS(45), 3, + ACTIONS(29), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(43), 26, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2299] = 7, + ACTIONS(129), 1, + anon_sym_IS, + ACTIONS(115), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(127), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(55), 3, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, + ACTIONS(125), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + ACTIONS(119), 5, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + ACTIONS(57), 15, + anon_sym_SELECT, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_OR, anon_sym_AND, + sym_identifier, + [2345] = 2, + ACTIONS(35), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_STAR, + anon_sym_COMMA, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, @@ -1883,969 +5756,1392 @@ static const uint16_t ts_small_parse_table[] = { anon_sym_PLUS, anon_sym_DASH, anon_sym_SLASH, - [316] = 6, - ACTIONS(45), 1, + ACTIONS(37), 19, + anon_sym_SELECT, + sym_alias_token, + anon_sym_FROM, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(51), 2, + anon_sym_AND, anon_sym_LT, anon_sym_GT, - ACTIONS(53), 2, + anon_sym_LIKE, + anon_sym_IS, + sym_identifier, + [2381] = 8, + ACTIONS(123), 1, + anon_sym_AND, + ACTIONS(129), 1, + anon_sym_IS, + ACTIONS(115), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(127), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(55), 3, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_COMMA, + ACTIONS(125), 3, + anon_sym_LT, + anon_sym_GT, + anon_sym_LIKE, + ACTIONS(119), 5, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(43), 17, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(57), 14, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_AS, + sym_alias_token, anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - [358] = 7, - ACTIONS(45), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, anon_sym_OR, - ACTIONS(55), 1, + sym_identifier, + [2429] = 10, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, anon_sym_AND, - ACTIONS(47), 2, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(135), 1, + anon_sym_COMMA, + STATE(158), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(87), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(51), 2, + ACTIONS(97), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(53), 2, + ACTIONS(99), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(91), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(43), 16, + anon_sym_LIKE, + ACTIONS(133), 10, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [402] = 4, - ACTIONS(47), 2, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2477] = 9, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(53), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(45), 3, - anon_sym_OR, + ACTIONS(67), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(43), 22, + ACTIONS(139), 2, + anon_sym_ASC, + anon_sym_DESC, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(137), 9, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2522] = 8, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - [440] = 3, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(45), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(43), 24, + anon_sym_LIKE, + ACTIONS(143), 11, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2565] = 8, + ACTIONS(93), 1, + anon_sym_OR, + ACTIONS(95), 1, anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - [476] = 2, - ACTIONS(59), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(57), 26, + anon_sym_LIKE, + ACTIONS(145), 11, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_STAR, anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2608] = 8, + ACTIONS(65), 1, anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - [510] = 2, - ACTIONS(63), 3, + anon_sym_LIKE, + ACTIONS(147), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2649] = 8, + ACTIONS(93), 1, anon_sym_OR, + ACTIONS(95), 1, + anon_sym_AND, + ACTIONS(101), 1, + anon_sym_IS, + ACTIONS(87), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(97), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(61), 26, + ACTIONS(99), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(91), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + ACTIONS(149), 9, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2690] = 14, + ACTIONS(151), 1, + anon_sym_STAR, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, + anon_sym_DASH, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + STATE(126), 1, + sym__select_elements, + STATE(143), 1, + sym__select_element, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(42), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2742] = 8, + ACTIONS(65), 1, anon_sym_AND, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - anon_sym_SLASH, - [544] = 2, - ACTIONS(67), 3, - anon_sym_OR, + ACTIONS(67), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(65), 26, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_AS, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_AND, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - [578] = 2, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(65), 25, + anon_sym_LIKE, + ACTIONS(143), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [2781] = 8, + ACTIONS(65), 1, anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, + anon_sym_LIKE, + ACTIONS(171), 7, + anon_sym_COMMA, anon_sym_RPAREN, - [610] = 7, - ACTIONS(55), 1, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [2820] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(71), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(47), 2, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(69), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, + anon_sym_LIKE, + ACTIONS(89), 7, anon_sym_COMMA, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [652] = 7, - ACTIONS(55), 1, + anon_sym_ON, + [2859] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(71), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(47), 2, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(73), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, + anon_sym_LIKE, + ACTIONS(105), 7, anon_sym_COMMA, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [694] = 7, - ACTIONS(55), 1, + anon_sym_ON, + [2898] = 13, + ACTIONS(173), 1, + anon_sym_STAR, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(177), 1, + anon_sym_RPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(132), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [2947] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(71), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(47), 2, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(75), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, + anon_sym_LIKE, + ACTIONS(103), 7, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [2986] = 13, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(195), 1, + anon_sym_STAR, + ACTIONS(197), 1, + anon_sym_RPAREN, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(133), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3035] = 13, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(199), 1, + anon_sym_STAR, + ACTIONS(201), 1, + anon_sym_RPAREN, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(134), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3084] = 12, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + STATE(167), 1, + sym_order_by_element, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(61), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3130] = 12, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + STATE(189), 1, + sym_order_by_element, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(61), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3176] = 12, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, + anon_sym_DASH, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + STATE(148), 1, + sym__select_element, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(42), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3222] = 8, + ACTIONS(205), 1, anon_sym_COMMA, + ACTIONS(207), 1, anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, + ACTIONS(211), 1, anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [736] = 2, - ACTIONS(17), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(15), 25, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, + STATE(128), 1, + sym_join_list, + STATE(135), 1, + sym_join_table, + STATE(151), 1, + aux_sym__from_clause_repeat1, + ACTIONS(209), 3, anon_sym_LEFT, anon_sym_RIGHT, - anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [768] = 2, - ACTIONS(25), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(23), 25, + ACTIONS(203), 12, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [800] = 2, - ACTIONS(29), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(27), 25, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [3260] = 5, + ACTIONS(117), 1, + sym_alias_token, + ACTIONS(131), 1, + sym_identifier, + STATE(127), 1, + sym_alias_suffix, + ACTIONS(213), 3, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [832] = 2, - ACTIONS(33), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(31), 25, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(215), 15, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [864] = 2, - ACTIONS(37), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(35), 25, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [3292] = 3, + ACTIONS(221), 1, + anon_sym_DOT, + ACTIONS(217), 3, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [896] = 2, - ACTIONS(41), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(39), 25, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(219), 17, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, + sym_alias_token, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + sym_identifier, + [3320] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [928] = 2, - ACTIONS(45), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(43), 25, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, + anon_sym_NOT, + ACTIONS(231), 1, + anon_sym_SQUOTE, + ACTIONS(233), 1, + anon_sym_DQUOTE, + ACTIONS(235), 1, + sym_number, + ACTIONS(239), 1, + sym_identifier, + ACTIONS(237), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(29), 3, + sym_string, + sym_boolean, + sym_null, + STATE(62), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3363] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [960] = 5, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(140), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3406] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, anon_sym_DASH, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(43), 16, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(49), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3449] = 1, + ACTIONS(241), 20, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_COMMA, + anon_sym_FROM, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_RPAREN, - [998] = 6, - ACTIONS(85), 1, - anon_sym_AND, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [3472] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(43), 15, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_OR, - anon_sym_RPAREN, - [1038] = 4, - ACTIONS(45), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(83), 2, - anon_sym_PLUS, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(11), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3515] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(12), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3558] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(13), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3601] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(14), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3644] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(15), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3687] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, + anon_sym_DASH, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(52), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3730] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, + anon_sym_DASH, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(59), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3773] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, + anon_sym_DASH, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(57), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3816] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, anon_sym_DASH, - ACTIONS(43), 21, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_RPAREN, - [1074] = 3, - ACTIONS(45), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(43), 23, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, + anon_sym_NOT, + ACTIONS(161), 1, + anon_sym_SQUOTE, + ACTIONS(163), 1, + anon_sym_DQUOTE, + ACTIONS(165), 1, + sym_number, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, + sym_null, + STATE(53), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3859] = 1, + ACTIONS(243), 20, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_COMMA, + anon_sym_FROM, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [3882] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - anon_sym_RPAREN, - [1108] = 2, - ACTIONS(59), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(57), 25, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(138), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3925] = 2, + ACTIONS(245), 3, ts_builtin_sym_end, anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [1140] = 2, - ACTIONS(63), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(61), 25, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(247), 17, anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, + sym_alias_token, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_AND, - anon_sym_OR, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_RPAREN, - [1172] = 8, - ACTIONS(55), 1, - anon_sym_AND, - ACTIONS(71), 1, - anon_sym_OR, - ACTIONS(89), 1, - anon_sym_AS, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(49), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(87), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [1213] = 3, - ACTIONS(93), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(87), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - ACTIONS(91), 11, - anon_sym_STAR, - anon_sym_AS, - anon_sym_AND, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - [1244] = 15, - ACTIONS(95), 1, - anon_sym_STAR, - ACTIONS(97), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + sym_identifier, + [3950] = 11, + ACTIONS(153), 1, + anon_sym_LPAREN, + ACTIONS(155), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(157), 1, + anon_sym_NULL, + ACTIONS(159), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(161), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(163), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(165), 1, sym_number, - ACTIONS(111), 1, + ACTIONS(169), 1, + sym_identifier, + ACTIONS(167), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(44), 3, + sym_string, + sym_boolean, sym_null, - ACTIONS(113), 1, + STATE(58), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, + sym_column_reference, + sym_literal, + [3993] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, sym_identifier, - STATE(36), 1, + ACTIONS(191), 2, + anon_sym_TRUE, + anon_sym_FALSE, + STATE(3), 3, + sym_string, + sym_boolean, + sym_null, + STATE(136), 7, + sym__expression, + sym_binary_expression, + sym_unary_expression, + sym_parenthesized_expression, + sym_function_call, sym_column_reference, - STATE(82), 1, - sym__select_elements, - ACTIONS(109), 2, + sym_literal, + [4036] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, + anon_sym_DASH, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, + anon_sym_NOT, + ACTIONS(185), 1, + anon_sym_SQUOTE, + ACTIONS(187), 1, + anon_sym_DQUOTE, + ACTIONS(189), 1, + sym_number, + ACTIONS(193), 1, + sym_identifier, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(93), 2, - sym__select_element, - sym_alias, - STATE(35), 6, + sym_null, + STATE(64), 7, sym__expression, sym_binary_expression, sym_unary_expression, sym_parenthesized_expression, sym_function_call, + sym_column_reference, sym_literal, - [1298] = 9, - ACTIONS(55), 1, - anon_sym_AND, - ACTIONS(71), 1, - anon_sym_OR, - ACTIONS(117), 1, - anon_sym_COMMA, - STATE(102), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(49), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(115), 6, + [4079] = 6, + ACTIONS(207), 1, + anon_sym_JOIN, + ACTIONS(211), 1, + anon_sym_INNER, + STATE(128), 1, + sym_join_list, + STATE(135), 1, + sym_join_table, + ACTIONS(209), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + ACTIONS(249), 13, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [1338] = 13, - ACTIONS(97), 1, - anon_sym_DASH, - ACTIONS(99), 1, - anon_sym_NOT, - ACTIONS(101), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [4112] = 11, + ACTIONS(175), 1, anon_sym_LPAREN, - ACTIONS(103), 1, - anon_sym_SQUOTE, - ACTIONS(105), 1, - anon_sym_DQUOTE, - ACTIONS(107), 1, - sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, - sym_identifier, - STATE(36), 1, - sym_column_reference, - ACTIONS(109), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 2, - sym_string, - sym_boolean, - STATE(95), 2, - sym__select_element, - sym_alias, - STATE(35), 6, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_literal, - [1386] = 12, - ACTIONS(119), 1, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(125), 1, - anon_sym_RPAREN, - ACTIONS(127), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(78), 7, + sym_null, + STATE(141), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -2853,32 +7149,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1431] = 12, - ACTIONS(119), 1, + [4155] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - STATE(117), 1, - sym_order_by_element, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(44), 7, + sym_null, + STATE(35), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -2886,60 +7181,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1476] = 7, - ACTIONS(55), 1, - anon_sym_AND, - ACTIONS(71), 1, - anon_sym_OR, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(49), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(139), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [1511] = 12, - ACTIONS(119), 1, + [4198] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - STATE(121), 1, - sym_order_by_element, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(44), 7, + sym_null, + STATE(36), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -2947,89 +7213,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1556] = 8, - ACTIONS(85), 1, - anon_sym_AND, - ACTIONS(145), 1, - anon_sym_OR, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(143), 2, - anon_sym_ASC, - anon_sym_DESC, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(141), 5, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_LIMIT, - [1593] = 7, - ACTIONS(55), 1, - anon_sym_AND, - ACTIONS(71), 1, - anon_sym_OR, - ACTIONS(47), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(49), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(147), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [1628] = 12, - ACTIONS(119), 1, + [4241] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(149), 1, - anon_sym_RPAREN, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(76), 7, + sym_null, + STATE(37), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3037,30 +7245,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1673] = 11, - ACTIONS(119), 1, + [4284] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(70), 7, + sym_null, + STATE(38), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3068,30 +7277,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1715] = 11, - ACTIONS(119), 1, + [4327] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(87), 7, + sym_null, + STATE(21), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3099,30 +7309,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1757] = 11, - ACTIONS(97), 1, + [4370] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(12), 7, + sym_null, + STATE(23), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3130,30 +7341,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1799] = 11, - ACTIONS(97), 1, + [4413] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(13), 7, + sym_null, + STATE(68), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3161,30 +7373,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1841] = 11, - ACTIONS(97), 1, + [4456] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(14), 7, + sym_null, + STATE(24), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3192,30 +7405,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1883] = 11, - ACTIONS(97), 1, + [4499] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(21), 7, + sym_null, + STATE(131), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3223,30 +7437,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1925] = 11, - ACTIONS(97), 1, + [4542] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(20), 7, + sym_null, + STATE(60), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3254,30 +7469,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [1967] = 11, - ACTIONS(119), 1, + [4585] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(86), 7, + sym_null, + STATE(25), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3285,30 +7501,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2009] = 11, - ACTIONS(97), 1, + [4628] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(19), 7, + sym_null, + STATE(137), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3316,30 +7533,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2051] = 11, - ACTIONS(97), 1, + [4671] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(42), 7, + sym_null, + STATE(6), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3347,30 +7565,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2093] = 11, - ACTIONS(97), 1, + [4714] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(75), 7, + sym_null, + STATE(129), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3378,30 +7597,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2135] = 11, - ACTIONS(119), 1, + [4757] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(28), 7, + sym_null, + STATE(67), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3409,30 +7629,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2177] = 11, - ACTIONS(119), 1, + [4800] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(29), 7, + sym_null, + STATE(63), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3440,30 +7661,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2219] = 11, - ACTIONS(119), 1, + [4843] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(30), 7, + sym_null, + STATE(69), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3471,30 +7693,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2261] = 11, - ACTIONS(119), 1, + [4886] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(31), 7, + sym_null, + STATE(72), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3502,30 +7725,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2303] = 11, - ACTIONS(119), 1, + [4929] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(32), 7, + sym_null, + STATE(70), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3533,30 +7757,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2345] = 11, - ACTIONS(97), 1, + [4972] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(38), 7, + sym_null, + STATE(30), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3564,30 +7789,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2387] = 11, - ACTIONS(97), 1, + [5015] = 11, + ACTIONS(175), 1, + anon_sym_LPAREN, + ACTIONS(179), 1, anon_sym_DASH, - ACTIONS(99), 1, + ACTIONS(181), 1, + anon_sym_NULL, + ACTIONS(183), 1, anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, + ACTIONS(185), 1, anon_sym_SQUOTE, - ACTIONS(105), 1, + ACTIONS(187), 1, anon_sym_DQUOTE, - ACTIONS(107), 1, + ACTIONS(189), 1, sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, + ACTIONS(193), 1, sym_identifier, - ACTIONS(109), 2, + ACTIONS(191), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(3), 2, + STATE(3), 3, sym_string, sym_boolean, - STATE(45), 7, + sym_null, + STATE(142), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3595,30 +7821,31 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2429] = 11, - ACTIONS(119), 1, + [5058] = 11, + ACTIONS(223), 1, + anon_sym_LPAREN, + ACTIONS(225), 1, anon_sym_DASH, - ACTIONS(121), 1, + ACTIONS(227), 1, + anon_sym_NULL, + ACTIONS(229), 1, anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, + ACTIONS(231), 1, anon_sym_SQUOTE, - ACTIONS(129), 1, + ACTIONS(233), 1, anon_sym_DQUOTE, - ACTIONS(131), 1, + ACTIONS(235), 1, sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, + ACTIONS(239), 1, sym_identifier, - ACTIONS(133), 2, + ACTIONS(237), 2, anon_sym_TRUE, anon_sym_FALSE, - STATE(22), 2, + STATE(29), 3, sym_string, sym_boolean, - STATE(66), 7, + sym_null, + STATE(65), 7, sym__expression, sym_binary_expression, sym_unary_expression, @@ -3626,1601 +7853,2817 @@ static const uint16_t ts_small_parse_table[] = { sym_function_call, sym_column_reference, sym_literal, - [2471] = 7, - ACTIONS(85), 1, + [5101] = 2, + ACTIONS(251), 1, + anon_sym_DOT, + ACTIONS(217), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_INSERT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_VALUES, + anon_sym_UPDATE, + anon_sym_SET, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [5125] = 1, + ACTIONS(253), 19, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5147] = 13, + ACTIONS(257), 1, + anon_sym_FROM, + ACTIONS(259), 1, + anon_sym_WHERE, + ACTIONS(261), 1, + anon_sym_GROUP, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(139), 1, + sym__from_clause, + STATE(145), 1, + sym__where_clause, + STATE(153), 1, + sym__group_by_clause, + STATE(164), 1, + sym__having_clause, + STATE(183), 1, + sym__order_by_clause, + STATE(212), 1, + sym__limit_clause, + ACTIONS(255), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5193] = 1, + ACTIONS(269), 19, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5215] = 1, + ACTIONS(271), 19, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5237] = 10, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(275), 1, + anon_sym_RPAREN, + STATE(260), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + [5276] = 1, + ACTIONS(245), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_WHERE, + anon_sym_INSERT, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_VALUES, + anon_sym_UPDATE, + anon_sym_SET, + anon_sym_DELETE, + anon_sym_CREATE, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [5297] = 10, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(277), 1, + anon_sym_RPAREN, + STATE(251), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + [5336] = 10, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(279), 1, + anon_sym_RPAREN, + STATE(246), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + [5375] = 10, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(145), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(77), 2, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(281), 1, + anon_sym_RPAREN, + STATE(250), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(81), 2, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(83), 2, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + [5414] = 10, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(283), 1, + anon_sym_RPAREN, + STATE(255), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(79), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(75), 6, + anon_sym_LIKE, + [5453] = 1, + ACTIONS(285), 18, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, - anon_sym_ON, - [2505] = 11, - ACTIONS(119), 1, - anon_sym_DASH, - ACTIONS(121), 1, - anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, - anon_sym_SQUOTE, - ACTIONS(129), 1, - anon_sym_DQUOTE, - ACTIONS(131), 1, - sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, - sym_identifier, - ACTIONS(133), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(22), 2, - sym_string, - sym_boolean, - STATE(68), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2547] = 7, - ACTIONS(85), 1, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5474] = 10, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(145), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(77), 2, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(287), 1, + anon_sym_RPAREN, + STATE(249), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(79), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(73), 6, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [2581] = 11, - ACTIONS(97), 1, - anon_sym_DASH, - ACTIONS(99), 1, - anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, - anon_sym_SQUOTE, - ACTIONS(105), 1, - anon_sym_DQUOTE, - ACTIONS(107), 1, - sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, - sym_identifier, - ACTIONS(109), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 2, - sym_string, - sym_boolean, - STATE(10), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2623] = 7, - ACTIONS(85), 1, + anon_sym_LIKE, + [5513] = 10, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(145), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(77), 2, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(289), 1, + anon_sym_RPAREN, + STATE(256), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(81), 2, + ACTIONS(61), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(67), 2, anon_sym_LT, anon_sym_GT, - ACTIONS(83), 2, + ACTIONS(63), 6, + anon_sym_EQ, + anon_sym_BANG_EQ, + anon_sym_LT_GT, + anon_sym_LT_EQ, + anon_sym_GT_EQ, + anon_sym_LIKE, + [5552] = 8, + ACTIONS(65), 1, + anon_sym_AND, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, + anon_sym_OR, + ACTIONS(59), 2, + anon_sym_STAR, + anon_sym_SLASH, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(79), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(145), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(69), 6, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [2657] = 11, - ACTIONS(119), 1, - anon_sym_DASH, - ACTIONS(121), 1, - anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, - anon_sym_SQUOTE, - ACTIONS(129), 1, - anon_sym_DQUOTE, - ACTIONS(131), 1, - sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, - sym_identifier, - ACTIONS(133), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(22), 2, - sym_string, - sym_boolean, - STATE(23), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2699] = 11, - ACTIONS(119), 1, - anon_sym_DASH, - ACTIONS(121), 1, - anon_sym_NOT, - ACTIONS(123), 1, - anon_sym_LPAREN, - ACTIONS(127), 1, - anon_sym_SQUOTE, - ACTIONS(129), 1, - anon_sym_DQUOTE, - ACTIONS(131), 1, - sym_number, - ACTIONS(135), 1, - sym_null, - ACTIONS(137), 1, - sym_identifier, - ACTIONS(133), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(22), 2, - sym_string, - sym_boolean, - STATE(81), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2741] = 11, - ACTIONS(97), 1, - anon_sym_DASH, - ACTIONS(99), 1, - anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, - anon_sym_SQUOTE, - ACTIONS(105), 1, - anon_sym_DQUOTE, - ACTIONS(107), 1, - sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, - sym_identifier, - ACTIONS(109), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 2, - sym_string, - sym_boolean, - STATE(5), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2783] = 11, - ACTIONS(97), 1, - anon_sym_DASH, - ACTIONS(99), 1, - anon_sym_NOT, - ACTIONS(101), 1, - anon_sym_LPAREN, - ACTIONS(103), 1, - anon_sym_SQUOTE, - ACTIONS(105), 1, - anon_sym_DQUOTE, - ACTIONS(107), 1, - sym_number, - ACTIONS(111), 1, - sym_null, - ACTIONS(113), 1, - sym_identifier, - ACTIONS(109), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 2, - sym_string, - sym_boolean, - STATE(11), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2825] = 7, - ACTIONS(55), 1, + anon_sym_LIKE, + [5586] = 11, + ACTIONS(259), 1, + anon_sym_WHERE, + ACTIONS(261), 1, + anon_sym_GROUP, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(146), 1, + sym__where_clause, + STATE(154), 1, + sym__group_by_clause, + STATE(165), 1, + sym__having_clause, + STATE(179), 1, + sym__order_by_clause, + STATE(227), 1, + sym__limit_clause, + ACTIONS(291), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5626] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(71), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(47), 2, + ACTIONS(293), 1, + anon_sym_RPAREN, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(51), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(53), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(49), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - ACTIONS(151), 5, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_ORDER, - anon_sym_LIMIT, - [2858] = 9, - ACTIONS(85), 1, + anon_sym_LIKE, + [5659] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(145), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(153), 1, - anon_sym_COMMA, - ACTIONS(155), 1, + ACTIONS(295), 1, anon_sym_RPAREN, - STATE(143), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(77), 2, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(79), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - [2893] = 7, - ACTIONS(159), 1, - anon_sym_COMMA, - ACTIONS(161), 1, - anon_sym_JOIN, - ACTIONS(165), 1, - anon_sym_INNER, - STATE(80), 1, - aux_sym_join_clause_repeat1, - STATE(94), 1, - aux_sym__from_clause_repeat1, - ACTIONS(163), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - ACTIONS(157), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [2924] = 9, - ACTIONS(85), 1, + anon_sym_LIKE, + [5692] = 8, + ACTIONS(65), 1, anon_sym_AND, - ACTIONS(145), 1, + ACTIONS(69), 1, + anon_sym_IS, + ACTIONS(141), 1, anon_sym_OR, - ACTIONS(153), 1, - anon_sym_COMMA, - ACTIONS(167), 1, + ACTIONS(297), 1, anon_sym_RPAREN, - STATE(142), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(77), 2, + ACTIONS(59), 2, anon_sym_STAR, anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, + ACTIONS(61), 2, anon_sym_PLUS, anon_sym_DASH, - ACTIONS(79), 5, + ACTIONS(67), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(63), 6, anon_sym_EQ, anon_sym_BANG_EQ, anon_sym_LT_GT, anon_sym_LT_EQ, anon_sym_GT_EQ, - [2959] = 2, - ACTIONS(171), 1, - anon_sym_DOT, - ACTIONS(169), 15, + anon_sym_LIKE, + [5725] = 3, + ACTIONS(301), 1, + anon_sym_COMMA, + STATE(147), 1, + aux_sym__select_elements_repeat1, + ACTIONS(299), 13, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, + anon_sym_FROM, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [2980] = 2, - STATE(84), 1, - aux_sym_join_clause_repeat1, - ACTIONS(173), 14, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5747] = 3, + ACTIONS(305), 1, + anon_sym_COMMA, + STATE(144), 1, + aux_sym__select_elements_repeat1, + ACTIONS(303), 13, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, + anon_sym_FROM, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [3000] = 7, - ACTIONS(85), 1, - anon_sym_AND, - ACTIONS(145), 1, - anon_sym_OR, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(147), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - [3030] = 13, - ACTIONS(177), 1, - anon_sym_FROM, - ACTIONS(179), 1, - anon_sym_WHERE, - ACTIONS(181), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5769] = 9, + ACTIONS(261), 1, anon_sym_GROUP, - ACTIONS(183), 1, + ACTIONS(263), 1, anon_sym_HAVING, - ACTIONS(185), 1, + ACTIONS(265), 1, anon_sym_ORDER, - ACTIONS(187), 1, + ACTIONS(267), 1, anon_sym_LIMIT, - STATE(88), 1, - sym__from_clause, - STATE(91), 1, - sym__where_clause, - STATE(99), 1, + STATE(154), 1, sym__group_by_clause, - STATE(107), 1, + STATE(165), 1, sym__having_clause, - STATE(119), 1, + STATE(179), 1, sym__order_by_clause, - STATE(140), 1, + STATE(227), 1, sym__limit_clause, - ACTIONS(175), 3, + ACTIONS(291), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3072] = 1, - ACTIONS(189), 15, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5803] = 9, + ACTIONS(261), 1, + anon_sym_GROUP, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(155), 1, + sym__group_by_clause, + STATE(163), 1, + sym__having_clause, + STATE(178), 1, + sym__order_by_clause, + STATE(225), 1, + sym__limit_clause, + ACTIONS(308), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5837] = 3, + ACTIONS(301), 1, anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, + STATE(144), 1, + aux_sym__select_elements_repeat1, + ACTIONS(310), 13, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_FROM, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [3090] = 5, - ACTIONS(193), 1, - anon_sym_JOIN, - ACTIONS(199), 1, - anon_sym_INNER, - STATE(84), 1, - aux_sym_join_clause_repeat1, - ACTIONS(196), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - ACTIONS(191), 9, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5859] = 1, + ACTIONS(303), 14, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_COMMA, + anon_sym_FROM, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [3116] = 5, - ACTIONS(161), 1, - anon_sym_JOIN, - ACTIONS(165), 1, - anon_sym_INNER, - STATE(80), 1, - aux_sym_join_clause_repeat1, - ACTIONS(163), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - ACTIONS(202), 9, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5876] = 4, + ACTIONS(312), 1, + anon_sym_INT, + STATE(188), 1, + sym_data_type, + ACTIONS(316), 2, + anon_sym_VARCHAR, + anon_sym_CHAR, + ACTIONS(314), 10, + anon_sym_INTEGER, + anon_sym_BIGINT, + anon_sym_SMALLINT, + anon_sym_TEXT, + anon_sym_DATE, + anon_sym_TIMESTAMP, + anon_sym_BOOLEAN, + anon_sym_FLOAT, + anon_sym_DOUBLE, + anon_sym_DECIMAL, + [5899] = 3, + ACTIONS(318), 1, + anon_sym_COMMA, + STATE(150), 1, + aux_sym__from_clause_repeat1, + ACTIONS(249), 12, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_WHERE, + anon_sym_GROUP, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5920] = 3, + ACTIONS(205), 1, anon_sym_COMMA, + STATE(150), 1, + aux_sym__from_clause_repeat1, + ACTIONS(321), 12, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, anon_sym_WHERE, anon_sym_GROUP, anon_sym_HAVING, anon_sym_ORDER, anon_sym_LIMIT, - [3142] = 7, - ACTIONS(85), 1, - anon_sym_AND, - ACTIONS(145), 1, - anon_sym_OR, - ACTIONS(204), 1, - anon_sym_RPAREN, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - [3171] = 7, - ACTIONS(85), 1, - anon_sym_AND, - ACTIONS(145), 1, - anon_sym_OR, - ACTIONS(206), 1, - anon_sym_RPAREN, - ACTIONS(77), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(83), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(79), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - [3200] = 11, - ACTIONS(179), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5941] = 1, + ACTIONS(323), 14, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_FROM, anon_sym_WHERE, - ACTIONS(181), 1, anon_sym_GROUP, - ACTIONS(183), 1, anon_sym_HAVING, - ACTIONS(185), 1, anon_sym_ORDER, - ACTIONS(187), 1, anon_sym_LIMIT, - STATE(90), 1, - sym__where_clause, - STATE(98), 1, - sym__group_by_clause, - STATE(111), 1, - sym__having_clause, - STATE(123), 1, - sym__order_by_clause, - STATE(145), 1, - sym__limit_clause, - ACTIONS(208), 3, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5958] = 7, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(165), 1, + sym__having_clause, + STATE(179), 1, + sym__order_by_clause, + STATE(227), 1, + sym__limit_clause, + ACTIONS(291), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [5986] = 7, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(163), 1, + sym__having_clause, + STATE(178), 1, + sym__order_by_clause, + STATE(225), 1, + sym__limit_clause, + ACTIONS(308), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6014] = 7, + ACTIONS(263), 1, + anon_sym_HAVING, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(162), 1, + sym__having_clause, + STATE(185), 1, + sym__order_by_clause, + STATE(211), 1, + sym__limit_clause, + ACTIONS(325), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6042] = 8, + ACTIONS(327), 1, + ts_builtin_sym_end, + ACTIONS(329), 1, + anon_sym_SELECT, + ACTIONS(332), 1, + anon_sym_INSERT, + ACTIONS(335), 1, + anon_sym_UPDATE, + ACTIONS(338), 1, + anon_sym_DELETE, + ACTIONS(341), 1, + anon_sym_CREATE, + STATE(156), 2, + sym__statement, + aux_sym_source_file_repeat1, + STATE(213), 5, + sym_select_statement, + sym_insert_statement, + sym_update_statement, + sym_delete_statement, + sym_create_table_statement, + [6072] = 8, + ACTIONS(5), 1, + anon_sym_SELECT, + ACTIONS(7), 1, + anon_sym_INSERT, + ACTIONS(9), 1, + anon_sym_UPDATE, + ACTIONS(11), 1, + anon_sym_DELETE, + ACTIONS(13), 1, + anon_sym_CREATE, + ACTIONS(344), 1, + ts_builtin_sym_end, + STATE(156), 2, + sym__statement, + aux_sym_source_file_repeat1, + STATE(213), 5, + sym_select_statement, + sym_insert_statement, + sym_update_statement, + sym_delete_statement, + sym_create_table_statement, + [6102] = 3, + ACTIONS(135), 1, + anon_sym_COMMA, + STATE(159), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(346), 10, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6121] = 3, + ACTIONS(348), 1, + anon_sym_COMMA, + STATE(159), 1, + aux_sym__group_by_clause_repeat1, + ACTIONS(145), 10, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3236] = 3, - ACTIONS(212), 1, + anon_sym_HAVING, + anon_sym_ORDER, + anon_sym_LIMIT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6140] = 5, + ACTIONS(353), 1, anon_sym_COMMA, - STATE(89), 1, - aux_sym__select_elements_repeat1, - ACTIONS(210), 9, + ACTIONS(355), 1, + anon_sym_WHERE, + STATE(168), 1, + aux_sym_update_statement_repeat1, + STATE(214), 1, + sym__where_clause, + ACTIONS(351), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_FROM, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6162] = 5, + ACTIONS(353), 1, + anon_sym_COMMA, + ACTIONS(355), 1, anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, + STATE(160), 1, + aux_sym_update_statement_repeat1, + STATE(228), 1, + sym__where_clause, + ACTIONS(357), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6184] = 5, + ACTIONS(265), 1, anon_sym_ORDER, + ACTIONS(267), 1, anon_sym_LIMIT, - [3254] = 9, - ACTIONS(181), 1, - anon_sym_GROUP, - ACTIONS(183), 1, - anon_sym_HAVING, - ACTIONS(185), 1, + STATE(190), 1, + sym__order_by_clause, + STATE(221), 1, + sym__limit_clause, + ACTIONS(359), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6206] = 5, + ACTIONS(265), 1, anon_sym_ORDER, - ACTIONS(187), 1, + ACTIONS(267), 1, anon_sym_LIMIT, - STATE(100), 1, - sym__group_by_clause, - STATE(109), 1, - sym__having_clause, - STATE(122), 1, + STATE(185), 1, sym__order_by_clause, - STATE(139), 1, + STATE(211), 1, sym__limit_clause, - ACTIONS(215), 3, + ACTIONS(325), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3284] = 9, - ACTIONS(181), 1, - anon_sym_GROUP, - ACTIONS(183), 1, - anon_sym_HAVING, - ACTIONS(185), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6228] = 5, + ACTIONS(265), 1, anon_sym_ORDER, - ACTIONS(187), 1, + ACTIONS(267), 1, anon_sym_LIMIT, - STATE(98), 1, - sym__group_by_clause, - STATE(111), 1, - sym__having_clause, - STATE(123), 1, + STATE(179), 1, sym__order_by_clause, - STATE(145), 1, + STATE(227), 1, + sym__limit_clause, + ACTIONS(291), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6250] = 5, + ACTIONS(265), 1, + anon_sym_ORDER, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(178), 1, + sym__order_by_clause, + STATE(225), 1, sym__limit_clause, - ACTIONS(208), 3, + ACTIONS(308), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3314] = 3, - ACTIONS(219), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6272] = 3, + ACTIONS(363), 1, anon_sym_COMMA, - STATE(89), 1, - aux_sym__select_elements_repeat1, - ACTIONS(217), 9, + STATE(169), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(361), 8, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, anon_sym_LIMIT, - [3332] = 3, - ACTIONS(219), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6289] = 3, + ACTIONS(363), 1, anon_sym_COMMA, - STATE(92), 1, - aux_sym__select_elements_repeat1, - ACTIONS(221), 9, + STATE(166), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(365), 8, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, anon_sym_LIMIT, - [3350] = 3, - ACTIONS(159), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6306] = 3, + ACTIONS(369), 1, anon_sym_COMMA, - STATE(97), 1, - aux_sym__from_clause_repeat1, - ACTIONS(223), 8, + STATE(168), 1, + aux_sym_update_statement_repeat1, + ACTIONS(367), 8, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6323] = 3, + ACTIONS(374), 1, + anon_sym_COMMA, + STATE(169), 1, + aux_sym__order_by_clause_repeat1, + ACTIONS(372), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, anon_sym_LIMIT, - [3367] = 1, - ACTIONS(210), 10, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6340] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(194), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(377), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6356] = 3, + ACTIONS(379), 1, anon_sym_COMMA, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [3380] = 1, - ACTIONS(225), 10, + STATE(172), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(381), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6372] = 3, + ACTIONS(379), 1, anon_sym_COMMA, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [3393] = 3, - ACTIONS(227), 1, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(383), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6388] = 3, + ACTIONS(379), 1, anon_sym_COMMA, - STATE(97), 1, - aux_sym__from_clause_repeat1, - ACTIONS(202), 8, + STATE(174), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(383), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6404] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(385), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6420] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(176), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(385), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6436] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(387), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6452] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(377), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6468] = 3, + ACTIONS(267), 1, anon_sym_LIMIT, - [3410] = 7, - ACTIONS(183), 1, - anon_sym_HAVING, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, + STATE(211), 1, + sym__limit_clause, + ACTIONS(325), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6484] = 3, + ACTIONS(267), 1, anon_sym_LIMIT, - STATE(109), 1, - sym__having_clause, - STATE(122), 1, - sym__order_by_clause, - STATE(139), 1, + STATE(225), 1, sym__limit_clause, - ACTIONS(215), 3, + ACTIONS(308), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3434] = 7, - ACTIONS(183), 1, - anon_sym_HAVING, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6500] = 5, + ACTIONS(394), 1, + anon_sym_DEFAULT, + ACTIONS(397), 1, + anon_sym_REFERENCES, + ACTIONS(389), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(180), 2, + sym_column_constraint, + aux_sym_column_definition_repeat1, + ACTIONS(391), 3, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + [6520] = 4, + ACTIONS(117), 1, + sym_alias_token, + ACTIONS(131), 1, + sym_identifier, + STATE(127), 1, + sym_alias_suffix, + ACTIONS(215), 6, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + [6538] = 3, + ACTIONS(355), 1, + anon_sym_WHERE, + STATE(206), 1, + sym__where_clause, + ACTIONS(400), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6554] = 3, + ACTIONS(267), 1, anon_sym_LIMIT, - STATE(111), 1, - sym__having_clause, - STATE(123), 1, - sym__order_by_clause, - STATE(145), 1, + STATE(227), 1, sym__limit_clause, - ACTIONS(208), 3, + ACTIONS(291), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3458] = 7, - ACTIONS(183), 1, - anon_sym_HAVING, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6570] = 1, + ACTIONS(402), 9, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, anon_sym_LIMIT, - STATE(113), 1, - sym__having_clause, - STATE(118), 1, - sym__order_by_clause, - STATE(144), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6582] = 3, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(221), 1, sym__limit_clause, - ACTIONS(230), 3, + ACTIONS(359), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6598] = 2, + ACTIONS(404), 1, + anon_sym_DOT, + ACTIONS(219), 8, + sym_alias_token, + anon_sym_JOIN, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_INNER, + anon_sym_FULL, + anon_sym_ON, + sym_identifier, + [6612] = 1, + ACTIONS(367), 9, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3482] = 3, - ACTIONS(232), 1, anon_sym_COMMA, - STATE(101), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(147), 6, + anon_sym_WHERE, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6624] = 5, + ACTIONS(410), 1, + anon_sym_DEFAULT, + ACTIONS(412), 1, + anon_sym_REFERENCES, + ACTIONS(406), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(193), 2, + sym_column_constraint, + aux_sym_column_definition_repeat1, + ACTIONS(408), 3, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + [6644] = 1, + ACTIONS(372), 9, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_HAVING, - anon_sym_ORDER, + anon_sym_COMMA, anon_sym_LIMIT, - [3497] = 3, - ACTIONS(117), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6656] = 3, + ACTIONS(267), 1, + anon_sym_LIMIT, + STATE(229), 1, + sym__limit_clause, + ACTIONS(414), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6672] = 3, + ACTIONS(379), 1, anon_sym_COMMA, - STATE(101), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(235), 6, + STATE(177), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(416), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - [3512] = 5, - ACTIONS(237), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6688] = 3, + ACTIONS(420), 1, + anon_sym_COMMA, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(418), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6704] = 5, + ACTIONS(410), 1, + anon_sym_DEFAULT, + ACTIONS(412), 1, + anon_sym_REFERENCES, + ACTIONS(423), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + STATE(180), 2, + sym_column_constraint, + aux_sym_column_definition_repeat1, + ACTIONS(408), 3, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + [6724] = 3, + ACTIONS(379), 1, + anon_sym_COMMA, + STATE(192), 1, + aux_sym_insert_statement_repeat2, + ACTIONS(425), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6740] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(243), 1, + ACTIONS(433), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_FULL, - [3530] = 2, - STATE(114), 1, - aux_sym_join_clause_repeat1, - ACTIONS(173), 6, + [6761] = 1, + ACTIONS(435), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6772] = 1, + ACTIONS(247), 8, + sym_alias_token, anon_sym_JOIN, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_INNER, anon_sym_FULL, anon_sym_ON, - [3542] = 5, - ACTIONS(237), 1, + sym_identifier, + [6783] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(245), 1, + ACTIONS(437), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_FULL, - [3560] = 5, - ACTIONS(237), 1, + [6804] = 1, + ACTIONS(439), 8, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_COMMA, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6815] = 2, + ACTIONS(443), 1, + anon_sym_LPAREN, + ACTIONS(441), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [6828] = 2, + ACTIONS(445), 1, + anon_sym_LPAREN, + ACTIONS(171), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [6841] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(247), 1, + ACTIONS(447), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_FULL, - [3578] = 5, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(123), 1, - sym__order_by_clause, - STATE(145), 1, - sym__limit_clause, - ACTIONS(208), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3596] = 5, - ACTIONS(237), 1, + [6862] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(249), 1, + ACTIONS(449), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_FULL, - [3614] = 5, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(118), 1, - sym__order_by_clause, - STATE(144), 1, - sym__limit_clause, - ACTIONS(230), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3632] = 5, - ACTIONS(237), 1, + [6883] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(251), 1, + ACTIONS(451), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, - anon_sym_FULL, - [3650] = 5, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(122), 1, - sym__order_by_clause, - STATE(139), 1, - sym__limit_clause, - ACTIONS(215), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3668] = 5, - ACTIONS(237), 1, + anon_sym_FULL, + [6904] = 6, + ACTIONS(427), 1, anon_sym_JOIN, - ACTIONS(241), 1, + ACTIONS(431), 1, anon_sym_INNER, - ACTIONS(253), 1, + ACTIONS(453), 1, anon_sym_ON, - STATE(104), 1, - aux_sym_join_clause_repeat1, - ACTIONS(239), 3, + STATE(128), 1, + sym_join_list, + STATE(209), 1, + sym_join_table, + ACTIONS(429), 3, anon_sym_LEFT, anon_sym_RIGHT, anon_sym_FULL, - [3686] = 5, - ACTIONS(185), 1, - anon_sym_ORDER, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(120), 1, - sym__order_by_clause, - STATE(136), 1, - sym__limit_clause, - ACTIONS(255), 3, + [6925] = 1, + ACTIONS(455), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3704] = 5, - ACTIONS(191), 1, - anon_sym_ON, - ACTIONS(257), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6935] = 1, + ACTIONS(385), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6945] = 1, + ACTIONS(457), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [6955] = 2, + ACTIONS(459), 1, + anon_sym_COMMA, + ACTIONS(285), 6, anon_sym_JOIN, - ACTIONS(263), 1, - anon_sym_INNER, - STATE(114), 1, - aux_sym_join_clause_repeat1, - ACTIONS(260), 3, anon_sym_LEFT, anon_sym_RIGHT, + anon_sym_INNER, anon_sym_FULL, - [3722] = 3, - ACTIONS(268), 1, + anon_sym_ON, + [6967] = 1, + ACTIONS(441), 7, anon_sym_COMMA, - STATE(115), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(266), 4, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [6977] = 1, + ACTIONS(359), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_LIMIT, - [3735] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - STATE(115), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(271), 4, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6987] = 1, + ACTIONS(291), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_LIMIT, - [3748] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - STATE(116), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(275), 4, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [6997] = 2, + ACTIONS(463), 1, + anon_sym_SEMI, + ACTIONS(461), 6, + ts_builtin_sym_end, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7009] = 1, + ACTIONS(465), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_LIMIT, - [3761] = 3, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(136), 1, - sym__limit_clause, - ACTIONS(255), 3, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7019] = 1, + ACTIONS(467), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3773] = 3, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(145), 1, - sym__limit_clause, - ACTIONS(208), 3, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7029] = 1, + ACTIONS(469), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3785] = 3, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(141), 1, - sym__limit_clause, - ACTIONS(277), 3, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7039] = 1, + ACTIONS(377), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7049] = 1, + ACTIONS(471), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3797] = 1, - ACTIONS(266), 5, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7059] = 1, + ACTIONS(383), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7069] = 1, + ACTIONS(473), 7, anon_sym_COMMA, - anon_sym_LIMIT, - [3805] = 3, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(144), 1, - sym__limit_clause, - ACTIONS(230), 3, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [7079] = 1, + ACTIONS(414), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3817] = 3, - ACTIONS(187), 1, - anon_sym_LIMIT, - STATE(139), 1, - sym__limit_clause, - ACTIONS(215), 3, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7089] = 1, + ACTIONS(416), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - [3829] = 4, - ACTIONS(5), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7099] = 1, + ACTIONS(381), 7, + ts_builtin_sym_end, + anon_sym_SEMI, anon_sym_SELECT, - ACTIONS(279), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7109] = 1, + ACTIONS(475), 7, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_PRIMARYKEY, + anon_sym_NOTNULL, + anon_sym_UNIQUE, + anon_sym_DEFAULT, + anon_sym_REFERENCES, + [7119] = 1, + ACTIONS(325), 7, ts_builtin_sym_end, - STATE(135), 1, - sym_select_statement, - STATE(126), 2, - sym__statement, - aux_sym_source_file_repeat1, - [3843] = 1, - ACTIONS(281), 5, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7129] = 1, + ACTIONS(477), 7, ts_builtin_sym_end, anon_sym_SEMI, anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_LIMIT, - [3851] = 4, - ACTIONS(283), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7139] = 1, + ACTIONS(308), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7149] = 1, + ACTIONS(351), 7, ts_builtin_sym_end, - ACTIONS(285), 1, + anon_sym_SEMI, anon_sym_SELECT, - STATE(135), 1, - sym_select_statement, - STATE(126), 2, - sym__statement, - aux_sym_source_file_repeat1, - [3865] = 2, - ACTIONS(288), 1, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7159] = 1, + ACTIONS(479), 7, + ts_builtin_sym_end, + anon_sym_SEMI, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7169] = 4, + ACTIONS(427), 1, + anon_sym_JOIN, + ACTIONS(431), 1, + anon_sym_INNER, + STATE(125), 1, + sym_join_table, + ACTIONS(429), 3, + anon_sym_LEFT, + anon_sym_RIGHT, + anon_sym_FULL, + [7184] = 1, + ACTIONS(481), 6, + ts_builtin_sym_end, + anon_sym_SELECT, + anon_sym_INSERT, + anon_sym_UPDATE, + anon_sym_DELETE, + anon_sym_CREATE, + [7193] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(106), 3, + STATE(181), 1, + sym_table_name, + STATE(195), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3874] = 2, - ACTIONS(288), 1, + [7205] = 3, + ACTIONS(485), 1, sym_identifier, - STATE(77), 3, + STATE(79), 1, + sym_table_name, + STATE(78), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3883] = 2, - ACTIONS(288), 1, + [7217] = 3, + ACTIONS(485), 1, sym_identifier, - STATE(105), 3, + STATE(79), 1, + sym_table_name, + STATE(100), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3892] = 2, - ACTIONS(288), 1, + [7229] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(112), 3, + STATE(181), 1, + sym_table_name, + STATE(205), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3901] = 2, - ACTIONS(288), 1, + [7241] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(110), 3, + STATE(181), 1, + sym_table_name, + STATE(204), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3910] = 2, - ACTIONS(288), 1, + [7253] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(85), 3, + STATE(181), 1, + sym_table_name, + STATE(202), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3919] = 2, - ACTIONS(288), 1, + [7265] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(103), 3, + STATE(181), 1, + sym_table_name, + STATE(198), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3928] = 2, - ACTIONS(288), 1, + [7277] = 3, + ACTIONS(483), 1, sym_identifier, - STATE(108), 3, + STATE(181), 1, + sym_table_name, + STATE(203), 3, sym__table_reference, + sym_table_alias, sym_join_clause, - sym_table_name, - [3937] = 2, - ACTIONS(292), 1, - anon_sym_SEMI, - ACTIONS(290), 2, - ts_builtin_sym_end, + [7289] = 4, + ACTIONS(5), 1, anon_sym_SELECT, - [3945] = 1, - ACTIONS(277), 3, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(487), 1, + anon_sym_LPAREN, + ACTIONS(489), 1, + anon_sym_VALUES, + STATE(217), 1, + sym_select_statement, + [7302] = 4, + ACTIONS(5), 1, anon_sym_SELECT, - [3951] = 1, - ACTIONS(294), 3, - ts_builtin_sym_end, - anon_sym_SEMI, + ACTIONS(491), 1, + anon_sym_LPAREN, + ACTIONS(493), 1, + anon_sym_VALUES, + STATE(218), 1, + sym_select_statement, + [7315] = 4, + ACTIONS(5), 1, anon_sym_SELECT, - [3957] = 3, - ACTIONS(147), 1, + ACTIONS(495), 1, + anon_sym_LPAREN, + ACTIONS(497), 1, + anon_sym_VALUES, + STATE(222), 1, + sym_select_statement, + [7328] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(501), 1, + anon_sym_RPAREN, + STATE(252), 1, + aux_sym_insert_statement_repeat1, + [7338] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(503), 1, + anon_sym_RPAREN, + STATE(247), 1, + aux_sym_insert_statement_repeat1, + [7348] = 3, + ACTIONS(505), 1, + anon_sym_COMMA, + ACTIONS(507), 1, anon_sym_RPAREN, - ACTIONS(296), 1, + STATE(257), 1, + aux_sym_create_table_statement_repeat1, + [7358] = 3, + ACTIONS(273), 1, anon_sym_COMMA, - STATE(138), 1, + ACTIONS(509), 1, + anon_sym_RPAREN, + STATE(258), 1, aux_sym__group_by_clause_repeat1, - [3967] = 1, - ACTIONS(230), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3973] = 1, - ACTIONS(208), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3979] = 1, - ACTIONS(299), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [3985] = 3, - ACTIONS(153), 1, + [7368] = 3, + ACTIONS(511), 1, anon_sym_COMMA, - ACTIONS(301), 1, + ACTIONS(514), 1, + anon_sym_RPAREN, + STATE(247), 1, + aux_sym_insert_statement_repeat1, + [7378] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(516), 1, anon_sym_RPAREN, - STATE(138), 1, + STATE(259), 1, + aux_sym_insert_statement_repeat1, + [7388] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(518), 1, + anon_sym_RPAREN, + STATE(258), 1, aux_sym__group_by_clause_repeat1, - [3995] = 3, - ACTIONS(153), 1, + [7398] = 3, + ACTIONS(273), 1, anon_sym_COMMA, - ACTIONS(303), 1, + ACTIONS(520), 1, anon_sym_RPAREN, - STATE(138), 1, + STATE(258), 1, aux_sym__group_by_clause_repeat1, - [4005] = 1, - ACTIONS(255), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [4011] = 1, - ACTIONS(215), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - [4017] = 1, - ACTIONS(305), 2, - ts_builtin_sym_end, + [7408] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(289), 1, + anon_sym_RPAREN, + STATE(258), 1, + aux_sym__group_by_clause_repeat1, + [7418] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(516), 1, + anon_sym_RPAREN, + STATE(247), 1, + aux_sym_insert_statement_repeat1, + [7428] = 3, + ACTIONS(522), 1, + anon_sym_COMMA, + ACTIONS(525), 1, + anon_sym_RPAREN, + STATE(253), 1, + aux_sym_create_table_statement_repeat1, + [7438] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(527), 1, + anon_sym_RPAREN, + STATE(244), 1, + aux_sym_insert_statement_repeat1, + [7448] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(529), 1, + anon_sym_RPAREN, + STATE(258), 1, + aux_sym__group_by_clause_repeat1, + [7458] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(531), 1, + anon_sym_RPAREN, + STATE(258), 1, + aux_sym__group_by_clause_repeat1, + [7468] = 3, + ACTIONS(505), 1, + anon_sym_COMMA, + ACTIONS(533), 1, + anon_sym_RPAREN, + STATE(253), 1, + aux_sym_create_table_statement_repeat1, + [7478] = 3, + ACTIONS(145), 1, + anon_sym_RPAREN, + ACTIONS(535), 1, + anon_sym_COMMA, + STATE(258), 1, + aux_sym__group_by_clause_repeat1, + [7488] = 3, + ACTIONS(499), 1, + anon_sym_COMMA, + ACTIONS(538), 1, + anon_sym_RPAREN, + STATE(247), 1, + aux_sym_insert_statement_repeat1, + [7498] = 3, + ACTIONS(273), 1, + anon_sym_COMMA, + ACTIONS(540), 1, + anon_sym_RPAREN, + STATE(258), 1, + aux_sym__group_by_clause_repeat1, + [7508] = 2, + ACTIONS(542), 1, + sym_identifier, + STATE(187), 1, + sym_update_assignment, + [7515] = 2, + ACTIONS(5), 1, anon_sym_SELECT, - [4022] = 2, - ACTIONS(307), 1, + STATE(219), 1, + sym_select_statement, + [7522] = 1, + ACTIONS(525), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [7527] = 2, + ACTIONS(544), 1, + sym_identifier, + STATE(313), 1, + sym_table_name, + [7534] = 2, + ACTIONS(546), 1, anon_sym_JOIN, - ACTIONS(309), 1, + ACTIONS(548), 1, anon_sym_OUTER, - [4029] = 2, - ACTIONS(311), 1, + [7541] = 2, + ACTIONS(550), 1, + anon_sym_NULL, + ACTIONS(552), 1, + anon_sym_NOT, + [7548] = 2, + ACTIONS(554), 1, + anon_sym_NULL, + ACTIONS(556), 1, + anon_sym_NOT, + [7555] = 1, + ACTIONS(514), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [7560] = 2, + ACTIONS(558), 1, + sym_identifier, + STATE(245), 1, + sym_column_definition, + [7567] = 2, + ACTIONS(5), 1, + anon_sym_SELECT, + STATE(207), 1, + sym_select_statement, + [7574] = 2, + ACTIONS(558), 1, + sym_identifier, + STATE(263), 1, + sym_column_definition, + [7581] = 2, + ACTIONS(5), 1, + anon_sym_SELECT, + STATE(223), 1, + sym_select_statement, + [7588] = 2, + ACTIONS(542), 1, + sym_identifier, + STATE(161), 1, + sym_update_assignment, + [7595] = 2, + ACTIONS(560), 1, + anon_sym_NULL, + ACTIONS(562), 1, + anon_sym_NOT, + [7602] = 2, + ACTIONS(544), 1, + sym_identifier, + STATE(182), 1, + sym_table_name, + [7609] = 2, + ACTIONS(544), 1, + sym_identifier, + STATE(241), 1, + sym_table_name, + [7616] = 2, + ACTIONS(544), 1, + sym_identifier, + STATE(201), 1, + sym_table_name, + [7623] = 2, + ACTIONS(544), 1, + sym_identifier, + STATE(311), 1, + sym_table_name, + [7630] = 2, + ACTIONS(564), 1, anon_sym_JOIN, - ACTIONS(313), 1, + ACTIONS(566), 1, anon_sym_OUTER, - [4036] = 1, - ACTIONS(315), 1, - anon_sym_DQUOTE, - [4040] = 1, - ACTIONS(317), 1, + [7637] = 1, + ACTIONS(568), 1, + aux_sym_string_token1, + [7641] = 1, + ACTIONS(570), 1, + sym_number, + [7645] = 1, + ACTIONS(572), 1, + sym_identifier, + [7649] = 1, + ACTIONS(574), 1, + anon_sym_LPAREN, + [7653] = 1, + ACTIONS(576), 1, + aux_sym_string_token2, + [7657] = 1, + ACTIONS(578), 1, + anon_sym_LPAREN, + [7661] = 1, + ACTIONS(580), 1, + anon_sym_SQUOTE, + [7665] = 1, + ACTIONS(580), 1, anon_sym_DQUOTE, - [4044] = 1, - ACTIONS(319), 1, + [7669] = 1, + ACTIONS(582), 1, + anon_sym_NULL, + [7673] = 1, + ACTIONS(584), 1, sym_identifier, - [4048] = 1, - ACTIONS(321), 1, + [7677] = 1, + ACTIONS(586), 1, sym_identifier, - [4052] = 1, - ACTIONS(323), 1, - ts_builtin_sym_end, - [4056] = 1, - ACTIONS(315), 1, + [7681] = 1, + ACTIONS(588), 1, + anon_sym_RPAREN, + [7685] = 1, + ACTIONS(590), 1, + sym_identifier, + [7689] = 1, + ACTIONS(281), 1, + anon_sym_RPAREN, + [7693] = 1, + ACTIONS(592), 1, + anon_sym_LPAREN, + [7697] = 1, + ACTIONS(594), 1, + anon_sym_NULL, + [7701] = 1, + ACTIONS(596), 1, + anon_sym_FROM, + [7705] = 1, + ACTIONS(598), 1, + anon_sym_TABLE, + [7709] = 1, + ACTIONS(600), 1, + sym_identifier, + [7713] = 1, + ACTIONS(602), 1, + anon_sym_LPAREN, + [7717] = 1, + ACTIONS(604), 1, + anon_sym_EQ, + [7721] = 1, + ACTIONS(606), 1, + sym_identifier, + [7725] = 1, + ACTIONS(608), 1, anon_sym_SQUOTE, - [4060] = 1, - ACTIONS(325), 1, - aux_sym_string_token2, - [4064] = 1, - ACTIONS(327), 1, - anon_sym_BY, - [4068] = 1, - ACTIONS(329), 1, - sym_number, - [4072] = 1, - ACTIONS(331), 1, + [7729] = 1, + ACTIONS(610), 1, + sym_identifier, + [7733] = 1, + ACTIONS(612), 1, anon_sym_JOIN, - [4076] = 1, - ACTIONS(333), 1, + [7737] = 1, + ACTIONS(614), 1, + anon_sym_DQUOTE, + [7741] = 1, + ACTIONS(608), 1, + anon_sym_DQUOTE, + [7745] = 1, + ACTIONS(616), 1, + sym_identifier, + [7749] = 1, + ACTIONS(618), 1, + sym_number, + [7753] = 1, + ACTIONS(620), 1, + sym_identifier, + [7757] = 1, + ACTIONS(283), 1, + anon_sym_RPAREN, + [7761] = 1, + ACTIONS(622), 1, + anon_sym_SET, + [7765] = 1, + ACTIONS(624), 1, + anon_sym_NULL, + [7769] = 1, + ACTIONS(626), 1, + anon_sym_LPAREN, + [7773] = 1, + ACTIONS(628), 1, + sym_identifier, + [7777] = 1, + ACTIONS(630), 1, aux_sym_string_token1, - [4080] = 1, - ACTIONS(335), 1, + [7781] = 1, + ACTIONS(632), 1, aux_sym_string_token2, - [4084] = 1, - ACTIONS(307), 1, + [7785] = 1, + ACTIONS(634), 1, + sym_identifier, + [7789] = 1, + ACTIONS(636), 1, + ts_builtin_sym_end, + [7793] = 1, + ACTIONS(279), 1, + anon_sym_RPAREN, + [7797] = 1, + ACTIONS(638), 1, + anon_sym_INTO, + [7801] = 1, + ACTIONS(546), 1, anon_sym_JOIN, - [4088] = 1, - ACTIONS(337), 1, + [7805] = 1, + ACTIONS(640), 1, + aux_sym_string_token2, + [7809] = 1, + ACTIONS(642), 1, sym_identifier, - [4092] = 1, - ACTIONS(339), 1, + [7813] = 1, + ACTIONS(644), 1, anon_sym_BY, - [4096] = 1, - ACTIONS(341), 1, - sym_identifier, - [4100] = 1, - ACTIONS(343), 1, + [7817] = 1, + ACTIONS(646), 1, aux_sym_string_token1, - [4104] = 1, - ACTIONS(311), 1, + [7821] = 1, + ACTIONS(648), 1, + anon_sym_BY, + [7825] = 1, + ACTIONS(650), 1, + anon_sym_RPAREN, + [7829] = 1, + ACTIONS(564), 1, anon_sym_JOIN, - [4108] = 1, - ACTIONS(317), 1, - anon_sym_SQUOTE, - [4112] = 1, - ACTIONS(345), 1, + [7833] = 1, + ACTIONS(652), 1, anon_sym_JOIN, + [7837] = 1, + ACTIONS(614), 1, + anon_sym_SQUOTE, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 40, - [SMALL_STATE(4)] = 74, - [SMALL_STATE(5)] = 112, - [SMALL_STATE(6)] = 146, - [SMALL_STATE(7)] = 180, - [SMALL_STATE(8)] = 214, - [SMALL_STATE(9)] = 248, - [SMALL_STATE(10)] = 282, - [SMALL_STATE(11)] = 316, - [SMALL_STATE(12)] = 358, - [SMALL_STATE(13)] = 402, - [SMALL_STATE(14)] = 440, - [SMALL_STATE(15)] = 476, - [SMALL_STATE(16)] = 510, - [SMALL_STATE(17)] = 544, - [SMALL_STATE(18)] = 578, - [SMALL_STATE(19)] = 610, - [SMALL_STATE(20)] = 652, - [SMALL_STATE(21)] = 694, - [SMALL_STATE(22)] = 736, - [SMALL_STATE(23)] = 768, - [SMALL_STATE(24)] = 800, - [SMALL_STATE(25)] = 832, - [SMALL_STATE(26)] = 864, - [SMALL_STATE(27)] = 896, - [SMALL_STATE(28)] = 928, - [SMALL_STATE(29)] = 960, - [SMALL_STATE(30)] = 998, - [SMALL_STATE(31)] = 1038, - [SMALL_STATE(32)] = 1074, - [SMALL_STATE(33)] = 1108, - [SMALL_STATE(34)] = 1140, - [SMALL_STATE(35)] = 1172, - [SMALL_STATE(36)] = 1213, - [SMALL_STATE(37)] = 1244, - [SMALL_STATE(38)] = 1298, - [SMALL_STATE(39)] = 1338, - [SMALL_STATE(40)] = 1386, - [SMALL_STATE(41)] = 1431, - [SMALL_STATE(42)] = 1476, - [SMALL_STATE(43)] = 1511, - [SMALL_STATE(44)] = 1556, - [SMALL_STATE(45)] = 1593, - [SMALL_STATE(46)] = 1628, - [SMALL_STATE(47)] = 1673, - [SMALL_STATE(48)] = 1715, - [SMALL_STATE(49)] = 1757, - [SMALL_STATE(50)] = 1799, - [SMALL_STATE(51)] = 1841, - [SMALL_STATE(52)] = 1883, - [SMALL_STATE(53)] = 1925, - [SMALL_STATE(54)] = 1967, - [SMALL_STATE(55)] = 2009, - [SMALL_STATE(56)] = 2051, - [SMALL_STATE(57)] = 2093, - [SMALL_STATE(58)] = 2135, - [SMALL_STATE(59)] = 2177, - [SMALL_STATE(60)] = 2219, - [SMALL_STATE(61)] = 2261, - [SMALL_STATE(62)] = 2303, - [SMALL_STATE(63)] = 2345, - [SMALL_STATE(64)] = 2387, - [SMALL_STATE(65)] = 2429, - [SMALL_STATE(66)] = 2471, - [SMALL_STATE(67)] = 2505, - [SMALL_STATE(68)] = 2547, - [SMALL_STATE(69)] = 2581, - [SMALL_STATE(70)] = 2623, - [SMALL_STATE(71)] = 2657, - [SMALL_STATE(72)] = 2699, - [SMALL_STATE(73)] = 2741, - [SMALL_STATE(74)] = 2783, - [SMALL_STATE(75)] = 2825, - [SMALL_STATE(76)] = 2858, - [SMALL_STATE(77)] = 2893, - [SMALL_STATE(78)] = 2924, - [SMALL_STATE(79)] = 2959, - [SMALL_STATE(80)] = 2980, - [SMALL_STATE(81)] = 3000, - [SMALL_STATE(82)] = 3030, - [SMALL_STATE(83)] = 3072, - [SMALL_STATE(84)] = 3090, - [SMALL_STATE(85)] = 3116, - [SMALL_STATE(86)] = 3142, - [SMALL_STATE(87)] = 3171, - [SMALL_STATE(88)] = 3200, - [SMALL_STATE(89)] = 3236, - [SMALL_STATE(90)] = 3254, - [SMALL_STATE(91)] = 3284, - [SMALL_STATE(92)] = 3314, - [SMALL_STATE(93)] = 3332, - [SMALL_STATE(94)] = 3350, - [SMALL_STATE(95)] = 3367, - [SMALL_STATE(96)] = 3380, - [SMALL_STATE(97)] = 3393, - [SMALL_STATE(98)] = 3410, - [SMALL_STATE(99)] = 3434, - [SMALL_STATE(100)] = 3458, - [SMALL_STATE(101)] = 3482, - [SMALL_STATE(102)] = 3497, - [SMALL_STATE(103)] = 3512, - [SMALL_STATE(104)] = 3530, - [SMALL_STATE(105)] = 3542, - [SMALL_STATE(106)] = 3560, - [SMALL_STATE(107)] = 3578, - [SMALL_STATE(108)] = 3596, - [SMALL_STATE(109)] = 3614, - [SMALL_STATE(110)] = 3632, - [SMALL_STATE(111)] = 3650, - [SMALL_STATE(112)] = 3668, - [SMALL_STATE(113)] = 3686, - [SMALL_STATE(114)] = 3704, - [SMALL_STATE(115)] = 3722, - [SMALL_STATE(116)] = 3735, - [SMALL_STATE(117)] = 3748, - [SMALL_STATE(118)] = 3761, - [SMALL_STATE(119)] = 3773, - [SMALL_STATE(120)] = 3785, - [SMALL_STATE(121)] = 3797, - [SMALL_STATE(122)] = 3805, - [SMALL_STATE(123)] = 3817, - [SMALL_STATE(124)] = 3829, - [SMALL_STATE(125)] = 3843, - [SMALL_STATE(126)] = 3851, - [SMALL_STATE(127)] = 3865, - [SMALL_STATE(128)] = 3874, - [SMALL_STATE(129)] = 3883, - [SMALL_STATE(130)] = 3892, - [SMALL_STATE(131)] = 3901, - [SMALL_STATE(132)] = 3910, - [SMALL_STATE(133)] = 3919, - [SMALL_STATE(134)] = 3928, - [SMALL_STATE(135)] = 3937, - [SMALL_STATE(136)] = 3945, - [SMALL_STATE(137)] = 3951, - [SMALL_STATE(138)] = 3957, - [SMALL_STATE(139)] = 3967, - [SMALL_STATE(140)] = 3973, - [SMALL_STATE(141)] = 3979, - [SMALL_STATE(142)] = 3985, - [SMALL_STATE(143)] = 3995, - [SMALL_STATE(144)] = 4005, - [SMALL_STATE(145)] = 4011, - [SMALL_STATE(146)] = 4017, - [SMALL_STATE(147)] = 4022, - [SMALL_STATE(148)] = 4029, - [SMALL_STATE(149)] = 4036, - [SMALL_STATE(150)] = 4040, - [SMALL_STATE(151)] = 4044, - [SMALL_STATE(152)] = 4048, - [SMALL_STATE(153)] = 4052, - [SMALL_STATE(154)] = 4056, - [SMALL_STATE(155)] = 4060, - [SMALL_STATE(156)] = 4064, - [SMALL_STATE(157)] = 4068, - [SMALL_STATE(158)] = 4072, - [SMALL_STATE(159)] = 4076, - [SMALL_STATE(160)] = 4080, - [SMALL_STATE(161)] = 4084, - [SMALL_STATE(162)] = 4088, - [SMALL_STATE(163)] = 4092, - [SMALL_STATE(164)] = 4096, - [SMALL_STATE(165)] = 4100, - [SMALL_STATE(166)] = 4104, - [SMALL_STATE(167)] = 4108, - [SMALL_STATE(168)] = 4112, + [SMALL_STATE(3)] = 50, + [SMALL_STATE(4)] = 94, + [SMALL_STATE(5)] = 138, + [SMALL_STATE(6)] = 182, + [SMALL_STATE(7)] = 226, + [SMALL_STATE(8)] = 270, + [SMALL_STATE(9)] = 314, + [SMALL_STATE(10)] = 358, + [SMALL_STATE(11)] = 402, + [SMALL_STATE(12)] = 446, + [SMALL_STATE(13)] = 494, + [SMALL_STATE(14)] = 548, + [SMALL_STATE(15)] = 600, + [SMALL_STATE(16)] = 646, + [SMALL_STATE(17)] = 690, + [SMALL_STATE(18)] = 734, + [SMALL_STATE(19)] = 778, + [SMALL_STATE(20)] = 822, + [SMALL_STATE(21)] = 866, + [SMALL_STATE(22)] = 906, + [SMALL_STATE(23)] = 944, + [SMALL_STATE(24)] = 994, + [SMALL_STATE(25)] = 1044, + [SMALL_STATE(26)] = 1094, + [SMALL_STATE(27)] = 1136, + [SMALL_STATE(28)] = 1174, + [SMALL_STATE(29)] = 1212, + [SMALL_STATE(30)] = 1250, + [SMALL_STATE(31)] = 1288, + [SMALL_STATE(32)] = 1326, + [SMALL_STATE(33)] = 1364, + [SMALL_STATE(34)] = 1402, + [SMALL_STATE(35)] = 1440, + [SMALL_STATE(36)] = 1478, + [SMALL_STATE(37)] = 1520, + [SMALL_STATE(38)] = 1570, + [SMALL_STATE(39)] = 1618, + [SMALL_STATE(40)] = 1656, + [SMALL_STATE(41)] = 1694, + [SMALL_STATE(42)] = 1732, + [SMALL_STATE(43)] = 1789, + [SMALL_STATE(44)] = 1825, + [SMALL_STATE(45)] = 1861, + [SMALL_STATE(46)] = 1897, + [SMALL_STATE(47)] = 1933, + [SMALL_STATE(48)] = 1969, + [SMALL_STATE(49)] = 2005, + [SMALL_STATE(50)] = 2041, + [SMALL_STATE(51)] = 2077, + [SMALL_STATE(52)] = 2113, + [SMALL_STATE(53)] = 2153, + [SMALL_STATE(54)] = 2191, + [SMALL_STATE(55)] = 2227, + [SMALL_STATE(56)] = 2263, + [SMALL_STATE(57)] = 2299, + [SMALL_STATE(58)] = 2345, + [SMALL_STATE(59)] = 2381, + [SMALL_STATE(60)] = 2429, + [SMALL_STATE(61)] = 2477, + [SMALL_STATE(62)] = 2522, + [SMALL_STATE(63)] = 2565, + [SMALL_STATE(64)] = 2608, + [SMALL_STATE(65)] = 2649, + [SMALL_STATE(66)] = 2690, + [SMALL_STATE(67)] = 2742, + [SMALL_STATE(68)] = 2781, + [SMALL_STATE(69)] = 2820, + [SMALL_STATE(70)] = 2859, + [SMALL_STATE(71)] = 2898, + [SMALL_STATE(72)] = 2947, + [SMALL_STATE(73)] = 2986, + [SMALL_STATE(74)] = 3035, + [SMALL_STATE(75)] = 3084, + [SMALL_STATE(76)] = 3130, + [SMALL_STATE(77)] = 3176, + [SMALL_STATE(78)] = 3222, + [SMALL_STATE(79)] = 3260, + [SMALL_STATE(80)] = 3292, + [SMALL_STATE(81)] = 3320, + [SMALL_STATE(82)] = 3363, + [SMALL_STATE(83)] = 3406, + [SMALL_STATE(84)] = 3449, + [SMALL_STATE(85)] = 3472, + [SMALL_STATE(86)] = 3515, + [SMALL_STATE(87)] = 3558, + [SMALL_STATE(88)] = 3601, + [SMALL_STATE(89)] = 3644, + [SMALL_STATE(90)] = 3687, + [SMALL_STATE(91)] = 3730, + [SMALL_STATE(92)] = 3773, + [SMALL_STATE(93)] = 3816, + [SMALL_STATE(94)] = 3859, + [SMALL_STATE(95)] = 3882, + [SMALL_STATE(96)] = 3925, + [SMALL_STATE(97)] = 3950, + [SMALL_STATE(98)] = 3993, + [SMALL_STATE(99)] = 4036, + [SMALL_STATE(100)] = 4079, + [SMALL_STATE(101)] = 4112, + [SMALL_STATE(102)] = 4155, + [SMALL_STATE(103)] = 4198, + [SMALL_STATE(104)] = 4241, + [SMALL_STATE(105)] = 4284, + [SMALL_STATE(106)] = 4327, + [SMALL_STATE(107)] = 4370, + [SMALL_STATE(108)] = 4413, + [SMALL_STATE(109)] = 4456, + [SMALL_STATE(110)] = 4499, + [SMALL_STATE(111)] = 4542, + [SMALL_STATE(112)] = 4585, + [SMALL_STATE(113)] = 4628, + [SMALL_STATE(114)] = 4671, + [SMALL_STATE(115)] = 4714, + [SMALL_STATE(116)] = 4757, + [SMALL_STATE(117)] = 4800, + [SMALL_STATE(118)] = 4843, + [SMALL_STATE(119)] = 4886, + [SMALL_STATE(120)] = 4929, + [SMALL_STATE(121)] = 4972, + [SMALL_STATE(122)] = 5015, + [SMALL_STATE(123)] = 5058, + [SMALL_STATE(124)] = 5101, + [SMALL_STATE(125)] = 5125, + [SMALL_STATE(126)] = 5147, + [SMALL_STATE(127)] = 5193, + [SMALL_STATE(128)] = 5215, + [SMALL_STATE(129)] = 5237, + [SMALL_STATE(130)] = 5276, + [SMALL_STATE(131)] = 5297, + [SMALL_STATE(132)] = 5336, + [SMALL_STATE(133)] = 5375, + [SMALL_STATE(134)] = 5414, + [SMALL_STATE(135)] = 5453, + [SMALL_STATE(136)] = 5474, + [SMALL_STATE(137)] = 5513, + [SMALL_STATE(138)] = 5552, + [SMALL_STATE(139)] = 5586, + [SMALL_STATE(140)] = 5626, + [SMALL_STATE(141)] = 5659, + [SMALL_STATE(142)] = 5692, + [SMALL_STATE(143)] = 5725, + [SMALL_STATE(144)] = 5747, + [SMALL_STATE(145)] = 5769, + [SMALL_STATE(146)] = 5803, + [SMALL_STATE(147)] = 5837, + [SMALL_STATE(148)] = 5859, + [SMALL_STATE(149)] = 5876, + [SMALL_STATE(150)] = 5899, + [SMALL_STATE(151)] = 5920, + [SMALL_STATE(152)] = 5941, + [SMALL_STATE(153)] = 5958, + [SMALL_STATE(154)] = 5986, + [SMALL_STATE(155)] = 6014, + [SMALL_STATE(156)] = 6042, + [SMALL_STATE(157)] = 6072, + [SMALL_STATE(158)] = 6102, + [SMALL_STATE(159)] = 6121, + [SMALL_STATE(160)] = 6140, + [SMALL_STATE(161)] = 6162, + [SMALL_STATE(162)] = 6184, + [SMALL_STATE(163)] = 6206, + [SMALL_STATE(164)] = 6228, + [SMALL_STATE(165)] = 6250, + [SMALL_STATE(166)] = 6272, + [SMALL_STATE(167)] = 6289, + [SMALL_STATE(168)] = 6306, + [SMALL_STATE(169)] = 6323, + [SMALL_STATE(170)] = 6340, + [SMALL_STATE(171)] = 6356, + [SMALL_STATE(172)] = 6372, + [SMALL_STATE(173)] = 6388, + [SMALL_STATE(174)] = 6404, + [SMALL_STATE(175)] = 6420, + [SMALL_STATE(176)] = 6436, + [SMALL_STATE(177)] = 6452, + [SMALL_STATE(178)] = 6468, + [SMALL_STATE(179)] = 6484, + [SMALL_STATE(180)] = 6500, + [SMALL_STATE(181)] = 6520, + [SMALL_STATE(182)] = 6538, + [SMALL_STATE(183)] = 6554, + [SMALL_STATE(184)] = 6570, + [SMALL_STATE(185)] = 6582, + [SMALL_STATE(186)] = 6598, + [SMALL_STATE(187)] = 6612, + [SMALL_STATE(188)] = 6624, + [SMALL_STATE(189)] = 6644, + [SMALL_STATE(190)] = 6656, + [SMALL_STATE(191)] = 6672, + [SMALL_STATE(192)] = 6688, + [SMALL_STATE(193)] = 6704, + [SMALL_STATE(194)] = 6724, + [SMALL_STATE(195)] = 6740, + [SMALL_STATE(196)] = 6761, + [SMALL_STATE(197)] = 6772, + [SMALL_STATE(198)] = 6783, + [SMALL_STATE(199)] = 6804, + [SMALL_STATE(200)] = 6815, + [SMALL_STATE(201)] = 6828, + [SMALL_STATE(202)] = 6841, + [SMALL_STATE(203)] = 6862, + [SMALL_STATE(204)] = 6883, + [SMALL_STATE(205)] = 6904, + [SMALL_STATE(206)] = 6925, + [SMALL_STATE(207)] = 6935, + [SMALL_STATE(208)] = 6945, + [SMALL_STATE(209)] = 6955, + [SMALL_STATE(210)] = 6967, + [SMALL_STATE(211)] = 6977, + [SMALL_STATE(212)] = 6987, + [SMALL_STATE(213)] = 6997, + [SMALL_STATE(214)] = 7009, + [SMALL_STATE(215)] = 7019, + [SMALL_STATE(216)] = 7029, + [SMALL_STATE(217)] = 7039, + [SMALL_STATE(218)] = 7049, + [SMALL_STATE(219)] = 7059, + [SMALL_STATE(220)] = 7069, + [SMALL_STATE(221)] = 7079, + [SMALL_STATE(222)] = 7089, + [SMALL_STATE(223)] = 7099, + [SMALL_STATE(224)] = 7109, + [SMALL_STATE(225)] = 7119, + [SMALL_STATE(226)] = 7129, + [SMALL_STATE(227)] = 7139, + [SMALL_STATE(228)] = 7149, + [SMALL_STATE(229)] = 7159, + [SMALL_STATE(230)] = 7169, + [SMALL_STATE(231)] = 7184, + [SMALL_STATE(232)] = 7193, + [SMALL_STATE(233)] = 7205, + [SMALL_STATE(234)] = 7217, + [SMALL_STATE(235)] = 7229, + [SMALL_STATE(236)] = 7241, + [SMALL_STATE(237)] = 7253, + [SMALL_STATE(238)] = 7265, + [SMALL_STATE(239)] = 7277, + [SMALL_STATE(240)] = 7289, + [SMALL_STATE(241)] = 7302, + [SMALL_STATE(242)] = 7315, + [SMALL_STATE(243)] = 7328, + [SMALL_STATE(244)] = 7338, + [SMALL_STATE(245)] = 7348, + [SMALL_STATE(246)] = 7358, + [SMALL_STATE(247)] = 7368, + [SMALL_STATE(248)] = 7378, + [SMALL_STATE(249)] = 7388, + [SMALL_STATE(250)] = 7398, + [SMALL_STATE(251)] = 7408, + [SMALL_STATE(252)] = 7418, + [SMALL_STATE(253)] = 7428, + [SMALL_STATE(254)] = 7438, + [SMALL_STATE(255)] = 7448, + [SMALL_STATE(256)] = 7458, + [SMALL_STATE(257)] = 7468, + [SMALL_STATE(258)] = 7478, + [SMALL_STATE(259)] = 7488, + [SMALL_STATE(260)] = 7498, + [SMALL_STATE(261)] = 7508, + [SMALL_STATE(262)] = 7515, + [SMALL_STATE(263)] = 7522, + [SMALL_STATE(264)] = 7527, + [SMALL_STATE(265)] = 7534, + [SMALL_STATE(266)] = 7541, + [SMALL_STATE(267)] = 7548, + [SMALL_STATE(268)] = 7555, + [SMALL_STATE(269)] = 7560, + [SMALL_STATE(270)] = 7567, + [SMALL_STATE(271)] = 7574, + [SMALL_STATE(272)] = 7581, + [SMALL_STATE(273)] = 7588, + [SMALL_STATE(274)] = 7595, + [SMALL_STATE(275)] = 7602, + [SMALL_STATE(276)] = 7609, + [SMALL_STATE(277)] = 7616, + [SMALL_STATE(278)] = 7623, + [SMALL_STATE(279)] = 7630, + [SMALL_STATE(280)] = 7637, + [SMALL_STATE(281)] = 7641, + [SMALL_STATE(282)] = 7645, + [SMALL_STATE(283)] = 7649, + [SMALL_STATE(284)] = 7653, + [SMALL_STATE(285)] = 7657, + [SMALL_STATE(286)] = 7661, + [SMALL_STATE(287)] = 7665, + [SMALL_STATE(288)] = 7669, + [SMALL_STATE(289)] = 7673, + [SMALL_STATE(290)] = 7677, + [SMALL_STATE(291)] = 7681, + [SMALL_STATE(292)] = 7685, + [SMALL_STATE(293)] = 7689, + [SMALL_STATE(294)] = 7693, + [SMALL_STATE(295)] = 7697, + [SMALL_STATE(296)] = 7701, + [SMALL_STATE(297)] = 7705, + [SMALL_STATE(298)] = 7709, + [SMALL_STATE(299)] = 7713, + [SMALL_STATE(300)] = 7717, + [SMALL_STATE(301)] = 7721, + [SMALL_STATE(302)] = 7725, + [SMALL_STATE(303)] = 7729, + [SMALL_STATE(304)] = 7733, + [SMALL_STATE(305)] = 7737, + [SMALL_STATE(306)] = 7741, + [SMALL_STATE(307)] = 7745, + [SMALL_STATE(308)] = 7749, + [SMALL_STATE(309)] = 7753, + [SMALL_STATE(310)] = 7757, + [SMALL_STATE(311)] = 7761, + [SMALL_STATE(312)] = 7765, + [SMALL_STATE(313)] = 7769, + [SMALL_STATE(314)] = 7773, + [SMALL_STATE(315)] = 7777, + [SMALL_STATE(316)] = 7781, + [SMALL_STATE(317)] = 7785, + [SMALL_STATE(318)] = 7789, + [SMALL_STATE(319)] = 7793, + [SMALL_STATE(320)] = 7797, + [SMALL_STATE(321)] = 7801, + [SMALL_STATE(322)] = 7805, + [SMALL_STATE(323)] = 7809, + [SMALL_STATE(324)] = 7813, + [SMALL_STATE(325)] = 7817, + [SMALL_STATE(326)] = 7821, + [SMALL_STATE(327)] = 7825, + [SMALL_STATE(328)] = 7829, + [SMALL_STATE(329)] = 7833, + [SMALL_STATE(330)] = 7837, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), - [7] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 1, 0, 0), - [9] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 1, 0, 0), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(162), - [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1, 0, 0), - [17] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1, 0, 0), - [19] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(152), - [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 0), - [25] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 0), - [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), - [29] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), - [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, 0, 0), - [33] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, 0, 0), - [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, 0, 0), - [37] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, 0, 0), - [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 3, 0, 0), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 3, 0, 0), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 0), - [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 0), - [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), - [49] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), - [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [55] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, 0, 0), - [59] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, 0, 0), - [61] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, 0, 0), - [63] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, 0, 0), - [65] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), - [67] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), - [69] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 6, 0, 0), - [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 5, 0, 0), - [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 4, 0, 0), - [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), - [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), - [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), - [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), - [87] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 1, 0, 0), - [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(164), - [91] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression, 1, 0, 0), - [93] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression, 1, 0, 0), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(165), - [105] = {.entry = {.count = 1, .reusable = true}}, SHIFT(155), - [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), - [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [115] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 3, 0, 0), - [117] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(71), - [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), - [125] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(159), - [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(160), - [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [133] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [135] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), - [137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [139] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__where_clause, 2, 0, 0), - [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 1, 0, 0), - [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), - [145] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), - [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [151] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__having_clause, 2, 0, 0), - [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(72), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [157] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 2, 0, 0), - [159] = {.entry = {.count = 1, .reusable = true}}, SHIFT(132), - [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(147), - [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(161), - [167] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [169] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 1, 0, 0), - [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(151), - [173] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_clause, 2, 0, 0), - [175] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 2, 0, 0), - [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), - [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [181] = {.entry = {.count = 1, .reusable = true}}, SHIFT(163), - [183] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(156), - [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(157), - [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 3, 0, 0), - [191] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), - [193] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(131), - [196] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(147), - [199] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(161), - [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), - [204] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [206] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 3, 0, 0), - [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), - [212] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), SHIFT_REPEAT(39), - [215] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 4, 0, 0), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 2, 0, 0), - [219] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [221] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 1, 0, 0), - [223] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 3, 0, 0), - [225] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias, 3, 0, 0), - [227] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(132), - [230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 5, 0, 0), - [232] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(64), - [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 4, 0, 0), - [237] = {.entry = {.count = 1, .reusable = true}}, SHIFT(133), - [239] = {.entry = {.count = 1, .reusable = true}}, SHIFT(148), - [241] = {.entry = {.count = 1, .reusable = true}}, SHIFT(166), - [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), - [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [247] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [249] = {.entry = {.count = 1, .reusable = true}}, SHIFT(67), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [253] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 6, 0, 0), - [257] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(133), - [260] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(148), - [263] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_join_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(166), - [266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), - [268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(43), - [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 4, 0, 0), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [275] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 3, 0, 0), - [277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 7, 0, 0), - [279] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 2, 0, 0), - [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [285] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(37), - [288] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), - [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 1, 0, 0), - [292] = {.entry = {.count = 1, .reusable = true}}, SHIFT(146), - [294] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__limit_clause, 2, 0, 0), - [296] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(72), - [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 8, 0, 0), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [303] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 2, 0, 0), - [307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), - [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), - [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(134), - [313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(168), - [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [319] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [323] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), - [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), - [331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(127), - [333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(167), - [335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(150), - [337] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), - [341] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(154), - [345] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), + [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 1, 0, 0), + [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), + [19] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 1, 0, 0), + [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1, 0, 0), + [25] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1, 0, 0), + [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), + [29] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), + [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_null, 1, 0, 0), + [33] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_null, 1, 0, 0), + [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 0), + [37] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 0), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, 0, 0), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, 0, 0), + [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, 0, 0), + [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, 0, 0), + [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 3, 0, 0), + [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 3, 0, 0), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 0), + [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 0), + [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), + [61] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), + [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [69] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, 0, 0), + [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, 0, 0), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 4, 0, 0), + [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 4, 0, 0), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, 0, 0), + [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, 0, 0), + [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), + [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 4, 0, 0), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), + [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 5, 0, 0), + [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 6, 0, 0), + [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), + [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 1, 0, 0), + [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__select_element, 1, 0, 0), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(323), + [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), + [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), + [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), + [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(274), + [131] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 3, 0, 0), + [135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), + [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 1, 0, 0), + [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), + [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__where_clause, 2, 0, 0), + [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), + [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_assignment, 3, 0, 0), + [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__having_clause, 2, 0, 0), + [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), + [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [157] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [159] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), + [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), + [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), + [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 2, 0, 0), + [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), + [175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), + [181] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), + [183] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), + [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), + [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), + [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), + [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 2, 0, 0), + [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), + [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(232), + [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(265), + [211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_alias, 1, 0, 0), + [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_alias, 1, 0, 0), + [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 1, 0, 0), + [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_name, 1, 0, 0), + [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), + [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [227] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [229] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), + [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), + [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [237] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [239] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias_suffix, 2, 0, 0), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias_suffix, 1, 0, 0), + [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 3, 0, 0), + [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_name, 3, 0, 0), + [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_list, 3, 0, 0), + [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 2, 0, 0), + [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), + [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), + [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), + [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_alias, 2, 0, 0), + [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_clause, 2, 0, 0), + [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), + [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), + [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), + [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_list, 1, 0, 0), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 3, 0, 0), + [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 1, 0, 0), + [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), + [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), + [305] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), SHIFT_REPEAT(77), + [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 4, 0, 0), + [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 2, 0, 0), + [312] = {.entry = {.count = 1, .reusable = false}}, SHIFT(210), + [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), + [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), + [318] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(234), + [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 3, 0, 0), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 2, 0, 0), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 5, 0, 0), + [327] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [329] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(66), + [332] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(320), + [335] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(278), + [338] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(296), + [341] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(297), + [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 4, 0, 0), + [348] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(117), + [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 5, 0, 0), + [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), + [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [357] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 4, 0, 0), + [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 6, 0, 0), + [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 4, 0, 0), + [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), + [365] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 3, 0, 0), + [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_update_statement_repeat1, 2, 0, 0), + [369] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_update_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(261), + [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), + [374] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(76), + [377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 8, 0, 0), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), + [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 10, 0, 0), + [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 11, 0, 0), + [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 12, 0, 0), + [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 13, 0, 0), + [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), + [391] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(224), + [394] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(108), + [397] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(277), + [400] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_delete_statement, 3, 0, 0), + [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 2, 0, 0), + [404] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), + [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_definition, 2, 0, 0), + [408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), + [410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), + [412] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), + [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 7, 0, 0), + [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 7, 0, 0), + [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 2, 0, 0), + [420] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 2, 0, 0), SHIFT_REPEAT(285), + [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_definition, 3, 0, 0), + [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 9, 0, 0), + [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), + [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), + [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 5, 0, 0), + [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), + [439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 4, 0, 0), + [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_data_type, 1, 0, 0), + [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), + [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), + [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [455] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_delete_statement, 4, 0, 0), + [457] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 5, 0, 0), + [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), + [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 1, 0, 0), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), + [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 6, 0, 0), + [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__limit_clause, 2, 0, 0), + [469] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_create_table_statement, 6, 0, 0), + [471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 4, 0, 0), + [473] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_data_type, 4, 0, 0), + [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 1, 0, 0), + [477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_create_table_statement, 7, 0, 0), + [479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 8, 0, 0), + [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 2, 0, 0), + [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), + [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), + [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), + [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), + [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), + [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), + [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), + [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), + [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), + [509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [511] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(301), + [514] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat1, 2, 0, 0), + [516] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), + [518] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), + [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [522] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_create_table_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(271), + [525] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_create_table_statement_repeat1, 2, 0, 0), + [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), + [529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), + [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), + [535] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(95), + [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), + [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), + [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), + [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), + [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), + [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), + [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), + [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), + [564] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), + [566] = {.entry = {.count = 1, .reusable = true}}, SHIFT(329), + [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(330), + [570] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), + [572] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), + [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), + [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), + [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), + [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), + [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(275), + [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), + [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), + [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), + [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), + [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), + [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), + [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), + [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), + [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), + [634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), + [636] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), + [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), + [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), + [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), + [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), + [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), + [652] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), }; #ifdef __cplusplus From 5c20719b6e3607f0a4da6cda5ee2c3a5f8419445 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 18:59:37 -0500 Subject: [PATCH 06/17] Ignore generated files. --- .gitignore | 5 +- src/grammar.json | 1825 ------- src/node-types.json | 1015 ---- src/parser.c | 10709 ------------------------------------------ 4 files changed, 4 insertions(+), 13550 deletions(-) delete mode 100644 src/grammar.json delete mode 100644 src/node-types.json delete mode 100644 src/parser.c diff --git a/.gitignore b/.gitignore index 53e30b4..1fd4956 100644 --- a/.gitignore +++ b/.gitignore @@ -136,4 +136,7 @@ out .DS_Store # Tree Sitter -src/tree_sitter/** \ No newline at end of file +src/tree_sitter/** +src/grammar.json +src/node-types.json +src/parser.c \ No newline at end of file diff --git a/src/grammar.json b/src/grammar.json deleted file mode 100644 index 0e23a64..0000000 --- a/src/grammar.json +++ /dev/null @@ -1,1825 +0,0 @@ -{ - "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", - "name": "base_sql", - "rules": { - "source_file": { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_statement" - } - }, - "_statement": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "select_statement" - }, - { - "type": "SYMBOL", - "name": "insert_statement" - }, - { - "type": "SYMBOL", - "name": "update_statement" - }, - { - "type": "SYMBOL", - "name": "delete_statement" - }, - { - "type": "SYMBOL", - "name": "create_table_statement" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": ";" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "select_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "SELECT" - }, - { - "type": "SYMBOL", - "name": "_select_elements" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_from_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_where_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_group_by_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_having_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_order_by_clause" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_limit_clause" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "_select_elements": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "*" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_select_element" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_select_element" - } - ] - } - } - ] - } - ] - }, - "_select_element": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "alias_suffix" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "alias_suffix": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "alias_token" - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - "alias_token": { - "type": "TOKEN", - "content": { - "type": "STRING", - "value": "AS" - } - }, - "_from_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "FROM" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_table_reference" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_table_reference" - } - ] - } - } - ] - } - ] - }, - "_table_reference": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "table_alias" - }, - { - "type": "SYMBOL", - "name": "join_clause" - } - ] - }, - "table_alias": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "alias_suffix" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "join_clause": { - "type": "PREC_LEFT", - "value": 2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_table_reference" - }, - { - "type": "SYMBOL", - "name": "join_list" - } - ] - } - }, - "join_table": { - "type": "PREC_LEFT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "JOIN" - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "LEFT" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "RIGHT" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "INNER" - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "FULL" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "OUTER" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "STRING", - "value": "JOIN" - } - ] - } - ] - }, - { - "type": "SYMBOL", - "name": "_table_reference" - }, - { - "type": "STRING", - "value": "ON" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - "join_list": { - "type": "PREC_LEFT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "join_table" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "join_table" - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - }, - "_where_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "WHERE" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - "_group_by_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "GROUP" - }, - { - "type": "STRING", - "value": "BY" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - } - ] - }, - "_having_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "HAVING" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - "_order_by_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "ORDER" - }, - { - "type": "STRING", - "value": "BY" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "order_by_element" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "order_by_element" - } - ] - } - } - ] - } - ] - }, - "order_by_element": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "ASC" - }, - { - "type": "STRING", - "value": "DESC" - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "_limit_clause": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "LIMIT" - }, - { - "type": "SYMBOL", - "name": "number" - } - ] - }, - "insert_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "INSERT" - }, - { - "type": "STRING", - "value": "INTO" - }, - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "VALUES" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - } - ] - } - } - ] - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "SYMBOL", - "name": "select_statement" - } - ] - } - ] - } - ] - } - ] - }, - "update_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "UPDATE" - }, - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "STRING", - "value": "SET" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "update_assignment" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "update_assignment" - } - ] - } - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_where_clause" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "update_assignment": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - "delete_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "DELETE" - }, - { - "type": "STRING", - "value": "FROM" - }, - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_where_clause" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - "create_table_statement": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "CREATE" - }, - { - "type": "STRING", - "value": "TABLE" - }, - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "column_definition" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "column_definition" - } - ] - } - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "column_definition": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "SYMBOL", - "name": "data_type" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "column_constraint" - } - } - ] - }, - "data_type": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "INT" - }, - { - "type": "STRING", - "value": "INTEGER" - }, - { - "type": "STRING", - "value": "BIGINT" - }, - { - "type": "STRING", - "value": "SMALLINT" - }, - { - "type": "STRING", - "value": "VARCHAR" - }, - { - "type": "STRING", - "value": "TEXT" - }, - { - "type": "STRING", - "value": "CHAR" - }, - { - "type": "STRING", - "value": "DATE" - }, - { - "type": "STRING", - "value": "TIMESTAMP" - }, - { - "type": "STRING", - "value": "BOOLEAN" - }, - { - "type": "STRING", - "value": "FLOAT" - }, - { - "type": "STRING", - "value": "DOUBLE" - }, - { - "type": "STRING", - "value": "DECIMAL" - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "VARCHAR" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "number" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "CHAR" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "number" - }, - { - "type": "STRING", - "value": ")" - } - ] - } - ] - }, - "column_constraint": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "PRIMARY KEY" - }, - { - "type": "STRING", - "value": "NOT NULL" - }, - { - "type": "STRING", - "value": "UNIQUE" - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "DEFAULT" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "REFERENCES" - }, - { - "type": "SYMBOL", - "name": "table_name" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - ] - }, - "_expression": { - "type": "PREC", - "value": 0, - "content": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "binary_expression" - }, - { - "type": "SYMBOL", - "name": "unary_expression" - }, - { - "type": "SYMBOL", - "name": "parenthesized_expression" - }, - { - "type": "SYMBOL", - "name": "function_call" - }, - { - "type": "SYMBOL", - "name": "column_reference" - }, - { - "type": "SYMBOL", - "name": "literal" - } - ] - } - }, - "binary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "PREC_LEFT", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "OR" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 2, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "AND" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "=" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "!=" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "<>" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "<" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "<=" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": ">" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": ">=" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "LIKE" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 4, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "+" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 4, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "-" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 5, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "*" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 5, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "/" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "IS" - }, - { - "type": "STRING", - "value": "NULL" - } - ] - } - }, - { - "type": "PREC_LEFT", - "value": 3, - "content": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": "IS" - }, - { - "type": "STRING", - "value": "NOT" - }, - { - "type": "STRING", - "value": "NULL" - } - ] - } - } - ] - }, - "unary_expression": { - "type": "CHOICE", - "members": [ - { - "type": "PREC", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "NOT" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - }, - { - "type": "PREC", - "value": 6, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "-" - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - "parenthesized_expression": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "function_call": { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "(" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "*" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "_expression" - }, - { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "," - }, - { - "type": "SYMBOL", - "name": "_expression" - } - ] - } - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "STRING", - "value": ")" - } - ] - }, - "column_reference": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "." - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - "table_name": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "identifier" - }, - { - "type": "STRING", - "value": "." - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "SYMBOL", - "name": "identifier" - } - ] - }, - "literal": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "string" - }, - { - "type": "SYMBOL", - "name": "number" - }, - { - "type": "SYMBOL", - "name": "boolean" - }, - { - "type": "SYMBOL", - "name": "null" - } - ] - }, - "string": { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "'" - }, - { - "type": "PATTERN", - "value": "[^']*" - }, - { - "type": "STRING", - "value": "'" - } - ] - }, - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "\"" - }, - { - "type": "PATTERN", - "value": "[^\"]*" - }, - { - "type": "STRING", - "value": "\"" - } - ] - } - ] - }, - "number": { - "type": "PATTERN", - "value": "\\d+(\\.\\d+)?" - }, - "boolean": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "TRUE" - }, - { - "type": "STRING", - "value": "FALSE" - } - ] - }, - "null": { - "type": "STRING", - "value": "NULL" - }, - "identifier": { - "type": "TOKEN", - "content": { - "type": "PATTERN", - "value": "[a-zA-Z_][a-zA-Z0-9_]*" - } - } - }, - "extras": [ - { - "type": "PATTERN", - "value": "\\s" - } - ], - "conflicts": [], - "precedences": [], - "externals": [], - "inline": [], - "supertypes": [] -} diff --git a/src/node-types.json b/src/node-types.json deleted file mode 100644 index f2c001d..0000000 --- a/src/node-types.json +++ /dev/null @@ -1,1015 +0,0 @@ -[ - { - "type": "alias_suffix", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "alias_token", - "named": true - }, - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "binary_expression", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "boolean", - "named": true, - "fields": {} - }, - { - "type": "column_constraint", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "table_name", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "column_definition", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "column_constraint", - "named": true - }, - { - "type": "data_type", - "named": true - }, - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "column_reference", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "create_table_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "column_definition", - "named": true - }, - { - "type": "table_name", - "named": true - } - ] - } - }, - { - "type": "data_type", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": false, - "types": [ - { - "type": "number", - "named": true - } - ] - } - }, - { - "type": "delete_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "table_name", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "function_call", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "insert_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "select_statement", - "named": true - }, - { - "type": "table_name", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "join_clause", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "join_clause", - "named": true - }, - { - "type": "join_list", - "named": true - }, - { - "type": "table_alias", - "named": true - } - ] - } - }, - { - "type": "join_list", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "join_table", - "named": true - } - ] - } - }, - { - "type": "join_table", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "join_clause", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "table_alias", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "literal", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "boolean", - "named": true - }, - { - "type": "null", - "named": true - }, - { - "type": "number", - "named": true - }, - { - "type": "string", - "named": true - } - ] - } - }, - { - "type": "null", - "named": true, - "fields": {} - }, - { - "type": "order_by_element", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "parenthesized_expression", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "select_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "alias_suffix", - "named": true - }, - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "join_clause", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "number", - "named": true - }, - { - "type": "order_by_element", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "table_alias", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "source_file", - "named": true, - "root": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "create_table_statement", - "named": true - }, - { - "type": "delete_statement", - "named": true - }, - { - "type": "insert_statement", - "named": true - }, - { - "type": "select_statement", - "named": true - }, - { - "type": "update_statement", - "named": true - } - ] - } - }, - { - "type": "string", - "named": true, - "fields": {} - }, - { - "type": "table_alias", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "alias_suffix", - "named": true - }, - { - "type": "table_name", - "named": true - } - ] - } - }, - { - "type": "table_name", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "identifier", - "named": true - } - ] - } - }, - { - "type": "unary_expression", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "update_assignment", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "unary_expression", - "named": true - } - ] - } - }, - { - "type": "update_statement", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": true, - "types": [ - { - "type": "binary_expression", - "named": true - }, - { - "type": "column_reference", - "named": true - }, - { - "type": "function_call", - "named": true - }, - { - "type": "literal", - "named": true - }, - { - "type": "parenthesized_expression", - "named": true - }, - { - "type": "table_name", - "named": true - }, - { - "type": "unary_expression", - "named": true - }, - { - "type": "update_assignment", - "named": true - } - ] - } - }, - { - "type": "!=", - "named": false - }, - { - "type": "\"", - "named": false - }, - { - "type": "'", - "named": false - }, - { - "type": "(", - "named": false - }, - { - "type": ")", - "named": false - }, - { - "type": "*", - "named": false - }, - { - "type": "+", - "named": false - }, - { - "type": ",", - "named": false - }, - { - "type": "-", - "named": false - }, - { - "type": ".", - "named": false - }, - { - "type": "/", - "named": false - }, - { - "type": ";", - "named": false - }, - { - "type": "<", - "named": false - }, - { - "type": "<=", - "named": false - }, - { - "type": "<>", - "named": false - }, - { - "type": "=", - "named": false - }, - { - "type": ">", - "named": false - }, - { - "type": ">=", - "named": false - }, - { - "type": "AND", - "named": false - }, - { - "type": "ASC", - "named": false - }, - { - "type": "BIGINT", - "named": false - }, - { - "type": "BOOLEAN", - "named": false - }, - { - "type": "BY", - "named": false - }, - { - "type": "CHAR", - "named": false - }, - { - "type": "CREATE", - "named": false - }, - { - "type": "DATE", - "named": false - }, - { - "type": "DECIMAL", - "named": false - }, - { - "type": "DEFAULT", - "named": false - }, - { - "type": "DELETE", - "named": false - }, - { - "type": "DESC", - "named": false - }, - { - "type": "DOUBLE", - "named": false - }, - { - "type": "FALSE", - "named": false - }, - { - "type": "FLOAT", - "named": false - }, - { - "type": "FROM", - "named": false - }, - { - "type": "FULL", - "named": false - }, - { - "type": "GROUP", - "named": false - }, - { - "type": "HAVING", - "named": false - }, - { - "type": "INNER", - "named": false - }, - { - "type": "INSERT", - "named": false - }, - { - "type": "INT", - "named": false - }, - { - "type": "INTEGER", - "named": false - }, - { - "type": "INTO", - "named": false - }, - { - "type": "IS", - "named": false - }, - { - "type": "JOIN", - "named": false - }, - { - "type": "LEFT", - "named": false - }, - { - "type": "LIKE", - "named": false - }, - { - "type": "LIMIT", - "named": false - }, - { - "type": "NOT", - "named": false - }, - { - "type": "NOT NULL", - "named": false - }, - { - "type": "NULL", - "named": false - }, - { - "type": "ON", - "named": false - }, - { - "type": "OR", - "named": false - }, - { - "type": "ORDER", - "named": false - }, - { - "type": "OUTER", - "named": false - }, - { - "type": "PRIMARY KEY", - "named": false - }, - { - "type": "REFERENCES", - "named": false - }, - { - "type": "RIGHT", - "named": false - }, - { - "type": "SELECT", - "named": false - }, - { - "type": "SET", - "named": false - }, - { - "type": "SMALLINT", - "named": false - }, - { - "type": "TABLE", - "named": false - }, - { - "type": "TEXT", - "named": false - }, - { - "type": "TIMESTAMP", - "named": false - }, - { - "type": "TRUE", - "named": false - }, - { - "type": "UNIQUE", - "named": false - }, - { - "type": "UPDATE", - "named": false - }, - { - "type": "VALUES", - "named": false - }, - { - "type": "VARCHAR", - "named": false - }, - { - "type": "WHERE", - "named": false - }, - { - "type": "alias_token", - "named": true - }, - { - "type": "identifier", - "named": true - }, - { - "type": "number", - "named": true - } -] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c deleted file mode 100644 index d93bbf3..0000000 --- a/src/parser.c +++ /dev/null @@ -1,10709 +0,0 @@ -#include "tree_sitter/parser.h" - -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif - -#ifdef _MSC_VER -#pragma optimize("", off) -#elif defined(__clang__) -#pragma clang optimize off -#elif defined(__GNUC__) -#pragma GCC optimize ("O0") -#endif - -#define LANGUAGE_VERSION 14 -#define STATE_COUNT 331 -#define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 122 -#define ALIAS_COUNT 0 -#define TOKEN_COUNT 75 -#define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 0 -#define MAX_ALIAS_SEQUENCE_LENGTH 13 -#define PRODUCTION_ID_COUNT 1 - -enum ts_symbol_identifiers { - anon_sym_SEMI = 1, - anon_sym_SELECT = 2, - anon_sym_STAR = 3, - anon_sym_COMMA = 4, - sym_alias_token = 5, - anon_sym_FROM = 6, - anon_sym_JOIN = 7, - anon_sym_LEFT = 8, - anon_sym_OUTER = 9, - anon_sym_RIGHT = 10, - anon_sym_INNER = 11, - anon_sym_FULL = 12, - anon_sym_ON = 13, - anon_sym_WHERE = 14, - anon_sym_GROUP = 15, - anon_sym_BY = 16, - anon_sym_HAVING = 17, - anon_sym_ORDER = 18, - anon_sym_ASC = 19, - anon_sym_DESC = 20, - anon_sym_LIMIT = 21, - anon_sym_INSERT = 22, - anon_sym_INTO = 23, - anon_sym_LPAREN = 24, - anon_sym_RPAREN = 25, - anon_sym_VALUES = 26, - anon_sym_UPDATE = 27, - anon_sym_SET = 28, - anon_sym_EQ = 29, - anon_sym_DELETE = 30, - anon_sym_CREATE = 31, - anon_sym_TABLE = 32, - anon_sym_INT = 33, - anon_sym_INTEGER = 34, - anon_sym_BIGINT = 35, - anon_sym_SMALLINT = 36, - anon_sym_VARCHAR = 37, - anon_sym_TEXT = 38, - anon_sym_CHAR = 39, - anon_sym_DATE = 40, - anon_sym_TIMESTAMP = 41, - anon_sym_BOOLEAN = 42, - anon_sym_FLOAT = 43, - anon_sym_DOUBLE = 44, - anon_sym_DECIMAL = 45, - anon_sym_PRIMARYKEY = 46, - anon_sym_NOTNULL = 47, - anon_sym_UNIQUE = 48, - anon_sym_DEFAULT = 49, - anon_sym_REFERENCES = 50, - anon_sym_OR = 51, - anon_sym_AND = 52, - anon_sym_BANG_EQ = 53, - anon_sym_LT_GT = 54, - anon_sym_LT = 55, - anon_sym_LT_EQ = 56, - anon_sym_GT = 57, - anon_sym_GT_EQ = 58, - anon_sym_LIKE = 59, - anon_sym_PLUS = 60, - anon_sym_DASH = 61, - anon_sym_SLASH = 62, - anon_sym_IS = 63, - anon_sym_NULL = 64, - anon_sym_NOT = 65, - anon_sym_DOT = 66, - anon_sym_SQUOTE = 67, - aux_sym_string_token1 = 68, - anon_sym_DQUOTE = 69, - aux_sym_string_token2 = 70, - sym_number = 71, - anon_sym_TRUE = 72, - anon_sym_FALSE = 73, - sym_identifier = 74, - sym_source_file = 75, - sym__statement = 76, - sym_select_statement = 77, - sym__select_elements = 78, - sym__select_element = 79, - sym_alias_suffix = 80, - sym__from_clause = 81, - sym__table_reference = 82, - sym_table_alias = 83, - sym_join_clause = 84, - sym_join_table = 85, - sym_join_list = 86, - sym__where_clause = 87, - sym__group_by_clause = 88, - sym__having_clause = 89, - sym__order_by_clause = 90, - sym_order_by_element = 91, - sym__limit_clause = 92, - sym_insert_statement = 93, - sym_update_statement = 94, - sym_update_assignment = 95, - sym_delete_statement = 96, - sym_create_table_statement = 97, - sym_column_definition = 98, - sym_data_type = 99, - sym_column_constraint = 100, - sym__expression = 101, - sym_binary_expression = 102, - sym_unary_expression = 103, - sym_parenthesized_expression = 104, - sym_function_call = 105, - sym_column_reference = 106, - sym_table_name = 107, - sym_literal = 108, - sym_string = 109, - sym_boolean = 110, - sym_null = 111, - aux_sym_source_file_repeat1 = 112, - aux_sym__select_elements_repeat1 = 113, - aux_sym__from_clause_repeat1 = 114, - aux_sym__group_by_clause_repeat1 = 115, - aux_sym__order_by_clause_repeat1 = 116, - aux_sym_insert_statement_repeat1 = 117, - aux_sym_insert_statement_repeat2 = 118, - aux_sym_update_statement_repeat1 = 119, - aux_sym_create_table_statement_repeat1 = 120, - aux_sym_column_definition_repeat1 = 121, -}; - -static const char * const ts_symbol_names[] = { - [ts_builtin_sym_end] = "end", - [anon_sym_SEMI] = ";", - [anon_sym_SELECT] = "SELECT", - [anon_sym_STAR] = "*", - [anon_sym_COMMA] = ",", - [sym_alias_token] = "alias_token", - [anon_sym_FROM] = "FROM", - [anon_sym_JOIN] = "JOIN", - [anon_sym_LEFT] = "LEFT", - [anon_sym_OUTER] = "OUTER", - [anon_sym_RIGHT] = "RIGHT", - [anon_sym_INNER] = "INNER", - [anon_sym_FULL] = "FULL", - [anon_sym_ON] = "ON", - [anon_sym_WHERE] = "WHERE", - [anon_sym_GROUP] = "GROUP", - [anon_sym_BY] = "BY", - [anon_sym_HAVING] = "HAVING", - [anon_sym_ORDER] = "ORDER", - [anon_sym_ASC] = "ASC", - [anon_sym_DESC] = "DESC", - [anon_sym_LIMIT] = "LIMIT", - [anon_sym_INSERT] = "INSERT", - [anon_sym_INTO] = "INTO", - [anon_sym_LPAREN] = "(", - [anon_sym_RPAREN] = ")", - [anon_sym_VALUES] = "VALUES", - [anon_sym_UPDATE] = "UPDATE", - [anon_sym_SET] = "SET", - [anon_sym_EQ] = "=", - [anon_sym_DELETE] = "DELETE", - [anon_sym_CREATE] = "CREATE", - [anon_sym_TABLE] = "TABLE", - [anon_sym_INT] = "INT", - [anon_sym_INTEGER] = "INTEGER", - [anon_sym_BIGINT] = "BIGINT", - [anon_sym_SMALLINT] = "SMALLINT", - [anon_sym_VARCHAR] = "VARCHAR", - [anon_sym_TEXT] = "TEXT", - [anon_sym_CHAR] = "CHAR", - [anon_sym_DATE] = "DATE", - [anon_sym_TIMESTAMP] = "TIMESTAMP", - [anon_sym_BOOLEAN] = "BOOLEAN", - [anon_sym_FLOAT] = "FLOAT", - [anon_sym_DOUBLE] = "DOUBLE", - [anon_sym_DECIMAL] = "DECIMAL", - [anon_sym_PRIMARYKEY] = "PRIMARY KEY", - [anon_sym_NOTNULL] = "NOT NULL", - [anon_sym_UNIQUE] = "UNIQUE", - [anon_sym_DEFAULT] = "DEFAULT", - [anon_sym_REFERENCES] = "REFERENCES", - [anon_sym_OR] = "OR", - [anon_sym_AND] = "AND", - [anon_sym_BANG_EQ] = "!=", - [anon_sym_LT_GT] = "<>", - [anon_sym_LT] = "<", - [anon_sym_LT_EQ] = "<=", - [anon_sym_GT] = ">", - [anon_sym_GT_EQ] = ">=", - [anon_sym_LIKE] = "LIKE", - [anon_sym_PLUS] = "+", - [anon_sym_DASH] = "-", - [anon_sym_SLASH] = "/", - [anon_sym_IS] = "IS", - [anon_sym_NULL] = "NULL", - [anon_sym_NOT] = "NOT", - [anon_sym_DOT] = ".", - [anon_sym_SQUOTE] = "'", - [aux_sym_string_token1] = "string_token1", - [anon_sym_DQUOTE] = "\"", - [aux_sym_string_token2] = "string_token2", - [sym_number] = "number", - [anon_sym_TRUE] = "TRUE", - [anon_sym_FALSE] = "FALSE", - [sym_identifier] = "identifier", - [sym_source_file] = "source_file", - [sym__statement] = "_statement", - [sym_select_statement] = "select_statement", - [sym__select_elements] = "_select_elements", - [sym__select_element] = "_select_element", - [sym_alias_suffix] = "alias_suffix", - [sym__from_clause] = "_from_clause", - [sym__table_reference] = "_table_reference", - [sym_table_alias] = "table_alias", - [sym_join_clause] = "join_clause", - [sym_join_table] = "join_table", - [sym_join_list] = "join_list", - [sym__where_clause] = "_where_clause", - [sym__group_by_clause] = "_group_by_clause", - [sym__having_clause] = "_having_clause", - [sym__order_by_clause] = "_order_by_clause", - [sym_order_by_element] = "order_by_element", - [sym__limit_clause] = "_limit_clause", - [sym_insert_statement] = "insert_statement", - [sym_update_statement] = "update_statement", - [sym_update_assignment] = "update_assignment", - [sym_delete_statement] = "delete_statement", - [sym_create_table_statement] = "create_table_statement", - [sym_column_definition] = "column_definition", - [sym_data_type] = "data_type", - [sym_column_constraint] = "column_constraint", - [sym__expression] = "_expression", - [sym_binary_expression] = "binary_expression", - [sym_unary_expression] = "unary_expression", - [sym_parenthesized_expression] = "parenthesized_expression", - [sym_function_call] = "function_call", - [sym_column_reference] = "column_reference", - [sym_table_name] = "table_name", - [sym_literal] = "literal", - [sym_string] = "string", - [sym_boolean] = "boolean", - [sym_null] = "null", - [aux_sym_source_file_repeat1] = "source_file_repeat1", - [aux_sym__select_elements_repeat1] = "_select_elements_repeat1", - [aux_sym__from_clause_repeat1] = "_from_clause_repeat1", - [aux_sym__group_by_clause_repeat1] = "_group_by_clause_repeat1", - [aux_sym__order_by_clause_repeat1] = "_order_by_clause_repeat1", - [aux_sym_insert_statement_repeat1] = "insert_statement_repeat1", - [aux_sym_insert_statement_repeat2] = "insert_statement_repeat2", - [aux_sym_update_statement_repeat1] = "update_statement_repeat1", - [aux_sym_create_table_statement_repeat1] = "create_table_statement_repeat1", - [aux_sym_column_definition_repeat1] = "column_definition_repeat1", -}; - -static const TSSymbol ts_symbol_map[] = { - [ts_builtin_sym_end] = ts_builtin_sym_end, - [anon_sym_SEMI] = anon_sym_SEMI, - [anon_sym_SELECT] = anon_sym_SELECT, - [anon_sym_STAR] = anon_sym_STAR, - [anon_sym_COMMA] = anon_sym_COMMA, - [sym_alias_token] = sym_alias_token, - [anon_sym_FROM] = anon_sym_FROM, - [anon_sym_JOIN] = anon_sym_JOIN, - [anon_sym_LEFT] = anon_sym_LEFT, - [anon_sym_OUTER] = anon_sym_OUTER, - [anon_sym_RIGHT] = anon_sym_RIGHT, - [anon_sym_INNER] = anon_sym_INNER, - [anon_sym_FULL] = anon_sym_FULL, - [anon_sym_ON] = anon_sym_ON, - [anon_sym_WHERE] = anon_sym_WHERE, - [anon_sym_GROUP] = anon_sym_GROUP, - [anon_sym_BY] = anon_sym_BY, - [anon_sym_HAVING] = anon_sym_HAVING, - [anon_sym_ORDER] = anon_sym_ORDER, - [anon_sym_ASC] = anon_sym_ASC, - [anon_sym_DESC] = anon_sym_DESC, - [anon_sym_LIMIT] = anon_sym_LIMIT, - [anon_sym_INSERT] = anon_sym_INSERT, - [anon_sym_INTO] = anon_sym_INTO, - [anon_sym_LPAREN] = anon_sym_LPAREN, - [anon_sym_RPAREN] = anon_sym_RPAREN, - [anon_sym_VALUES] = anon_sym_VALUES, - [anon_sym_UPDATE] = anon_sym_UPDATE, - [anon_sym_SET] = anon_sym_SET, - [anon_sym_EQ] = anon_sym_EQ, - [anon_sym_DELETE] = anon_sym_DELETE, - [anon_sym_CREATE] = anon_sym_CREATE, - [anon_sym_TABLE] = anon_sym_TABLE, - [anon_sym_INT] = anon_sym_INT, - [anon_sym_INTEGER] = anon_sym_INTEGER, - [anon_sym_BIGINT] = anon_sym_BIGINT, - [anon_sym_SMALLINT] = anon_sym_SMALLINT, - [anon_sym_VARCHAR] = anon_sym_VARCHAR, - [anon_sym_TEXT] = anon_sym_TEXT, - [anon_sym_CHAR] = anon_sym_CHAR, - [anon_sym_DATE] = anon_sym_DATE, - [anon_sym_TIMESTAMP] = anon_sym_TIMESTAMP, - [anon_sym_BOOLEAN] = anon_sym_BOOLEAN, - [anon_sym_FLOAT] = anon_sym_FLOAT, - [anon_sym_DOUBLE] = anon_sym_DOUBLE, - [anon_sym_DECIMAL] = anon_sym_DECIMAL, - [anon_sym_PRIMARYKEY] = anon_sym_PRIMARYKEY, - [anon_sym_NOTNULL] = anon_sym_NOTNULL, - [anon_sym_UNIQUE] = anon_sym_UNIQUE, - [anon_sym_DEFAULT] = anon_sym_DEFAULT, - [anon_sym_REFERENCES] = anon_sym_REFERENCES, - [anon_sym_OR] = anon_sym_OR, - [anon_sym_AND] = anon_sym_AND, - [anon_sym_BANG_EQ] = anon_sym_BANG_EQ, - [anon_sym_LT_GT] = anon_sym_LT_GT, - [anon_sym_LT] = anon_sym_LT, - [anon_sym_LT_EQ] = anon_sym_LT_EQ, - [anon_sym_GT] = anon_sym_GT, - [anon_sym_GT_EQ] = anon_sym_GT_EQ, - [anon_sym_LIKE] = anon_sym_LIKE, - [anon_sym_PLUS] = anon_sym_PLUS, - [anon_sym_DASH] = anon_sym_DASH, - [anon_sym_SLASH] = anon_sym_SLASH, - [anon_sym_IS] = anon_sym_IS, - [anon_sym_NULL] = anon_sym_NULL, - [anon_sym_NOT] = anon_sym_NOT, - [anon_sym_DOT] = anon_sym_DOT, - [anon_sym_SQUOTE] = anon_sym_SQUOTE, - [aux_sym_string_token1] = aux_sym_string_token1, - [anon_sym_DQUOTE] = anon_sym_DQUOTE, - [aux_sym_string_token2] = aux_sym_string_token2, - [sym_number] = sym_number, - [anon_sym_TRUE] = anon_sym_TRUE, - [anon_sym_FALSE] = anon_sym_FALSE, - [sym_identifier] = sym_identifier, - [sym_source_file] = sym_source_file, - [sym__statement] = sym__statement, - [sym_select_statement] = sym_select_statement, - [sym__select_elements] = sym__select_elements, - [sym__select_element] = sym__select_element, - [sym_alias_suffix] = sym_alias_suffix, - [sym__from_clause] = sym__from_clause, - [sym__table_reference] = sym__table_reference, - [sym_table_alias] = sym_table_alias, - [sym_join_clause] = sym_join_clause, - [sym_join_table] = sym_join_table, - [sym_join_list] = sym_join_list, - [sym__where_clause] = sym__where_clause, - [sym__group_by_clause] = sym__group_by_clause, - [sym__having_clause] = sym__having_clause, - [sym__order_by_clause] = sym__order_by_clause, - [sym_order_by_element] = sym_order_by_element, - [sym__limit_clause] = sym__limit_clause, - [sym_insert_statement] = sym_insert_statement, - [sym_update_statement] = sym_update_statement, - [sym_update_assignment] = sym_update_assignment, - [sym_delete_statement] = sym_delete_statement, - [sym_create_table_statement] = sym_create_table_statement, - [sym_column_definition] = sym_column_definition, - [sym_data_type] = sym_data_type, - [sym_column_constraint] = sym_column_constraint, - [sym__expression] = sym__expression, - [sym_binary_expression] = sym_binary_expression, - [sym_unary_expression] = sym_unary_expression, - [sym_parenthesized_expression] = sym_parenthesized_expression, - [sym_function_call] = sym_function_call, - [sym_column_reference] = sym_column_reference, - [sym_table_name] = sym_table_name, - [sym_literal] = sym_literal, - [sym_string] = sym_string, - [sym_boolean] = sym_boolean, - [sym_null] = sym_null, - [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, - [aux_sym__select_elements_repeat1] = aux_sym__select_elements_repeat1, - [aux_sym__from_clause_repeat1] = aux_sym__from_clause_repeat1, - [aux_sym__group_by_clause_repeat1] = aux_sym__group_by_clause_repeat1, - [aux_sym__order_by_clause_repeat1] = aux_sym__order_by_clause_repeat1, - [aux_sym_insert_statement_repeat1] = aux_sym_insert_statement_repeat1, - [aux_sym_insert_statement_repeat2] = aux_sym_insert_statement_repeat2, - [aux_sym_update_statement_repeat1] = aux_sym_update_statement_repeat1, - [aux_sym_create_table_statement_repeat1] = aux_sym_create_table_statement_repeat1, - [aux_sym_column_definition_repeat1] = aux_sym_column_definition_repeat1, -}; - -static const TSSymbolMetadata ts_symbol_metadata[] = { - [ts_builtin_sym_end] = { - .visible = false, - .named = true, - }, - [anon_sym_SEMI] = { - .visible = true, - .named = false, - }, - [anon_sym_SELECT] = { - .visible = true, - .named = false, - }, - [anon_sym_STAR] = { - .visible = true, - .named = false, - }, - [anon_sym_COMMA] = { - .visible = true, - .named = false, - }, - [sym_alias_token] = { - .visible = true, - .named = true, - }, - [anon_sym_FROM] = { - .visible = true, - .named = false, - }, - [anon_sym_JOIN] = { - .visible = true, - .named = false, - }, - [anon_sym_LEFT] = { - .visible = true, - .named = false, - }, - [anon_sym_OUTER] = { - .visible = true, - .named = false, - }, - [anon_sym_RIGHT] = { - .visible = true, - .named = false, - }, - [anon_sym_INNER] = { - .visible = true, - .named = false, - }, - [anon_sym_FULL] = { - .visible = true, - .named = false, - }, - [anon_sym_ON] = { - .visible = true, - .named = false, - }, - [anon_sym_WHERE] = { - .visible = true, - .named = false, - }, - [anon_sym_GROUP] = { - .visible = true, - .named = false, - }, - [anon_sym_BY] = { - .visible = true, - .named = false, - }, - [anon_sym_HAVING] = { - .visible = true, - .named = false, - }, - [anon_sym_ORDER] = { - .visible = true, - .named = false, - }, - [anon_sym_ASC] = { - .visible = true, - .named = false, - }, - [anon_sym_DESC] = { - .visible = true, - .named = false, - }, - [anon_sym_LIMIT] = { - .visible = true, - .named = false, - }, - [anon_sym_INSERT] = { - .visible = true, - .named = false, - }, - [anon_sym_INTO] = { - .visible = true, - .named = false, - }, - [anon_sym_LPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_RPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_VALUES] = { - .visible = true, - .named = false, - }, - [anon_sym_UPDATE] = { - .visible = true, - .named = false, - }, - [anon_sym_SET] = { - .visible = true, - .named = false, - }, - [anon_sym_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_DELETE] = { - .visible = true, - .named = false, - }, - [anon_sym_CREATE] = { - .visible = true, - .named = false, - }, - [anon_sym_TABLE] = { - .visible = true, - .named = false, - }, - [anon_sym_INT] = { - .visible = true, - .named = false, - }, - [anon_sym_INTEGER] = { - .visible = true, - .named = false, - }, - [anon_sym_BIGINT] = { - .visible = true, - .named = false, - }, - [anon_sym_SMALLINT] = { - .visible = true, - .named = false, - }, - [anon_sym_VARCHAR] = { - .visible = true, - .named = false, - }, - [anon_sym_TEXT] = { - .visible = true, - .named = false, - }, - [anon_sym_CHAR] = { - .visible = true, - .named = false, - }, - [anon_sym_DATE] = { - .visible = true, - .named = false, - }, - [anon_sym_TIMESTAMP] = { - .visible = true, - .named = false, - }, - [anon_sym_BOOLEAN] = { - .visible = true, - .named = false, - }, - [anon_sym_FLOAT] = { - .visible = true, - .named = false, - }, - [anon_sym_DOUBLE] = { - .visible = true, - .named = false, - }, - [anon_sym_DECIMAL] = { - .visible = true, - .named = false, - }, - [anon_sym_PRIMARYKEY] = { - .visible = true, - .named = false, - }, - [anon_sym_NOTNULL] = { - .visible = true, - .named = false, - }, - [anon_sym_UNIQUE] = { - .visible = true, - .named = false, - }, - [anon_sym_DEFAULT] = { - .visible = true, - .named = false, - }, - [anon_sym_REFERENCES] = { - .visible = true, - .named = false, - }, - [anon_sym_OR] = { - .visible = true, - .named = false, - }, - [anon_sym_AND] = { - .visible = true, - .named = false, - }, - [anon_sym_BANG_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_LT] = { - .visible = true, - .named = false, - }, - [anon_sym_LT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_GT] = { - .visible = true, - .named = false, - }, - [anon_sym_GT_EQ] = { - .visible = true, - .named = false, - }, - [anon_sym_LIKE] = { - .visible = true, - .named = false, - }, - [anon_sym_PLUS] = { - .visible = true, - .named = false, - }, - [anon_sym_DASH] = { - .visible = true, - .named = false, - }, - [anon_sym_SLASH] = { - .visible = true, - .named = false, - }, - [anon_sym_IS] = { - .visible = true, - .named = false, - }, - [anon_sym_NULL] = { - .visible = true, - .named = false, - }, - [anon_sym_NOT] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT] = { - .visible = true, - .named = false, - }, - [anon_sym_SQUOTE] = { - .visible = true, - .named = false, - }, - [aux_sym_string_token1] = { - .visible = false, - .named = false, - }, - [anon_sym_DQUOTE] = { - .visible = true, - .named = false, - }, - [aux_sym_string_token2] = { - .visible = false, - .named = false, - }, - [sym_number] = { - .visible = true, - .named = true, - }, - [anon_sym_TRUE] = { - .visible = true, - .named = false, - }, - [anon_sym_FALSE] = { - .visible = true, - .named = false, - }, - [sym_identifier] = { - .visible = true, - .named = true, - }, - [sym_source_file] = { - .visible = true, - .named = true, - }, - [sym__statement] = { - .visible = false, - .named = true, - }, - [sym_select_statement] = { - .visible = true, - .named = true, - }, - [sym__select_elements] = { - .visible = false, - .named = true, - }, - [sym__select_element] = { - .visible = false, - .named = true, - }, - [sym_alias_suffix] = { - .visible = true, - .named = true, - }, - [sym__from_clause] = { - .visible = false, - .named = true, - }, - [sym__table_reference] = { - .visible = false, - .named = true, - }, - [sym_table_alias] = { - .visible = true, - .named = true, - }, - [sym_join_clause] = { - .visible = true, - .named = true, - }, - [sym_join_table] = { - .visible = true, - .named = true, - }, - [sym_join_list] = { - .visible = true, - .named = true, - }, - [sym__where_clause] = { - .visible = false, - .named = true, - }, - [sym__group_by_clause] = { - .visible = false, - .named = true, - }, - [sym__having_clause] = { - .visible = false, - .named = true, - }, - [sym__order_by_clause] = { - .visible = false, - .named = true, - }, - [sym_order_by_element] = { - .visible = true, - .named = true, - }, - [sym__limit_clause] = { - .visible = false, - .named = true, - }, - [sym_insert_statement] = { - .visible = true, - .named = true, - }, - [sym_update_statement] = { - .visible = true, - .named = true, - }, - [sym_update_assignment] = { - .visible = true, - .named = true, - }, - [sym_delete_statement] = { - .visible = true, - .named = true, - }, - [sym_create_table_statement] = { - .visible = true, - .named = true, - }, - [sym_column_definition] = { - .visible = true, - .named = true, - }, - [sym_data_type] = { - .visible = true, - .named = true, - }, - [sym_column_constraint] = { - .visible = true, - .named = true, - }, - [sym__expression] = { - .visible = false, - .named = true, - }, - [sym_binary_expression] = { - .visible = true, - .named = true, - }, - [sym_unary_expression] = { - .visible = true, - .named = true, - }, - [sym_parenthesized_expression] = { - .visible = true, - .named = true, - }, - [sym_function_call] = { - .visible = true, - .named = true, - }, - [sym_column_reference] = { - .visible = true, - .named = true, - }, - [sym_table_name] = { - .visible = true, - .named = true, - }, - [sym_literal] = { - .visible = true, - .named = true, - }, - [sym_string] = { - .visible = true, - .named = true, - }, - [sym_boolean] = { - .visible = true, - .named = true, - }, - [sym_null] = { - .visible = true, - .named = true, - }, - [aux_sym_source_file_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__select_elements_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__from_clause_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__group_by_clause_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym__order_by_clause_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_insert_statement_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_insert_statement_repeat2] = { - .visible = false, - .named = false, - }, - [aux_sym_update_statement_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_create_table_statement_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_column_definition_repeat1] = { - .visible = false, - .named = false, - }, -}; - -static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { - [0] = {0}, -}; - -static const uint16_t ts_non_terminal_alias_map[] = { - 0, -}; - -static const TSStateId ts_primary_state_ids[STATE_COUNT] = { - [0] = 0, - [1] = 1, - [2] = 2, - [3] = 3, - [4] = 4, - [5] = 5, - [6] = 6, - [7] = 7, - [8] = 8, - [9] = 9, - [10] = 10, - [11] = 11, - [12] = 12, - [13] = 13, - [14] = 14, - [15] = 15, - [16] = 16, - [17] = 17, - [18] = 18, - [19] = 19, - [20] = 2, - [21] = 15, - [22] = 19, - [23] = 23, - [24] = 24, - [25] = 25, - [26] = 2, - [27] = 5, - [28] = 4, - [29] = 3, - [30] = 6, - [31] = 7, - [32] = 8, - [33] = 9, - [34] = 10, - [35] = 11, - [36] = 12, - [37] = 13, - [38] = 14, - [39] = 16, - [40] = 17, - [41] = 18, - [42] = 42, - [43] = 10, - [44] = 3, - [45] = 7, - [46] = 8, - [47] = 9, - [48] = 5, - [49] = 11, - [50] = 18, - [51] = 19, - [52] = 12, - [53] = 15, - [54] = 16, - [55] = 17, - [56] = 4, - [57] = 14, - [58] = 6, - [59] = 13, - [60] = 60, - [61] = 61, - [62] = 62, - [63] = 63, - [64] = 64, - [65] = 65, - [66] = 66, - [67] = 62, - [68] = 68, - [69] = 23, - [70] = 25, - [71] = 71, - [72] = 24, - [73] = 71, - [74] = 71, - [75] = 75, - [76] = 76, - [77] = 77, - [78] = 78, - [79] = 79, - [80] = 80, - [81] = 81, - [82] = 82, - [83] = 83, - [84] = 84, - [85] = 83, - [86] = 86, - [87] = 87, - [88] = 88, - [89] = 89, - [90] = 86, - [91] = 87, - [92] = 88, - [93] = 89, - [94] = 94, - [95] = 95, - [96] = 96, - [97] = 97, - [98] = 98, - [99] = 99, - [100] = 100, - [101] = 82, - [102] = 83, - [103] = 86, - [104] = 87, - [105] = 88, - [106] = 89, - [107] = 107, - [108] = 108, - [109] = 109, - [110] = 110, - [111] = 111, - [112] = 112, - [113] = 113, - [114] = 97, - [115] = 115, - [116] = 81, - [117] = 95, - [118] = 107, - [119] = 109, - [120] = 112, - [121] = 97, - [122] = 82, - [123] = 123, - [124] = 80, - [125] = 125, - [126] = 126, - [127] = 127, - [128] = 128, - [129] = 129, - [130] = 96, - [131] = 131, - [132] = 132, - [133] = 132, - [134] = 132, - [135] = 135, - [136] = 136, - [137] = 137, - [138] = 63, - [139] = 139, - [140] = 140, - [141] = 140, - [142] = 140, - [143] = 143, - [144] = 144, - [145] = 145, - [146] = 146, - [147] = 147, - [148] = 148, - [149] = 149, - [150] = 150, - [151] = 151, - [152] = 152, - [153] = 153, - [154] = 154, - [155] = 155, - [156] = 156, - [157] = 157, - [158] = 158, - [159] = 159, - [160] = 160, - [161] = 161, - [162] = 162, - [163] = 163, - [164] = 164, - [165] = 165, - [166] = 166, - [167] = 167, - [168] = 168, - [169] = 169, - [170] = 170, - [171] = 171, - [172] = 172, - [173] = 173, - [174] = 174, - [175] = 175, - [176] = 176, - [177] = 177, - [178] = 178, - [179] = 179, - [180] = 180, - [181] = 79, - [182] = 182, - [183] = 183, - [184] = 184, - [185] = 185, - [186] = 80, - [187] = 187, - [188] = 188, - [189] = 189, - [190] = 190, - [191] = 191, - [192] = 192, - [193] = 193, - [194] = 194, - [195] = 195, - [196] = 196, - [197] = 96, - [198] = 198, - [199] = 199, - [200] = 200, - [201] = 201, - [202] = 202, - [203] = 195, - [204] = 202, - [205] = 198, - [206] = 206, - [207] = 207, - [208] = 208, - [209] = 135, - [210] = 210, - [211] = 211, - [212] = 212, - [213] = 213, - [214] = 214, - [215] = 215, - [216] = 216, - [217] = 217, - [218] = 218, - [219] = 219, - [220] = 220, - [221] = 221, - [222] = 222, - [223] = 223, - [224] = 224, - [225] = 225, - [226] = 226, - [227] = 227, - [228] = 228, - [229] = 229, - [230] = 230, - [231] = 231, - [232] = 232, - [233] = 233, - [234] = 234, - [235] = 235, - [236] = 236, - [237] = 236, - [238] = 235, - [239] = 232, - [240] = 240, - [241] = 241, - [242] = 242, - [243] = 243, - [244] = 244, - [245] = 245, - [246] = 246, - [247] = 247, - [248] = 248, - [249] = 249, - [250] = 246, - [251] = 251, - [252] = 252, - [253] = 253, - [254] = 254, - [255] = 246, - [256] = 256, - [257] = 257, - [258] = 159, - [259] = 259, - [260] = 260, - [261] = 261, - [262] = 262, - [263] = 263, - [264] = 264, - [265] = 265, - [266] = 266, - [267] = 266, - [268] = 268, - [269] = 269, - [270] = 270, - [271] = 271, - [272] = 272, - [273] = 273, - [274] = 266, - [275] = 275, - [276] = 276, - [277] = 277, - [278] = 278, - [279] = 265, - [280] = 280, - [281] = 281, - [282] = 282, - [283] = 283, - [284] = 284, - [285] = 285, - [286] = 286, - [287] = 287, - [288] = 288, - [289] = 289, - [290] = 290, - [291] = 291, - [292] = 292, - [293] = 293, - [294] = 294, - [295] = 288, - [296] = 296, - [297] = 297, - [298] = 298, - [299] = 299, - [300] = 300, - [301] = 301, - [302] = 286, - [303] = 292, - [304] = 304, - [305] = 287, - [306] = 287, - [307] = 289, - [308] = 308, - [309] = 292, - [310] = 293, - [311] = 311, - [312] = 288, - [313] = 313, - [314] = 289, - [315] = 280, - [316] = 284, - [317] = 317, - [318] = 318, - [319] = 293, - [320] = 320, - [321] = 321, - [322] = 284, - [323] = 323, - [324] = 324, - [325] = 280, - [326] = 326, - [327] = 327, - [328] = 321, - [329] = 304, - [330] = 286, -}; - -static bool ts_lex(TSLexer *lexer, TSStateId state) { - START_LEXER(); - eof = lexer->eof(lexer); - switch (state) { - case 0: - if (eof) ADVANCE(187); - ADVANCE_MAP( - '!', 5, - '"', 283, - '\'', 280, - '(', 226, - ')', 227, - '*', 191, - '+', 270, - ',', 192, - '-', 271, - '.', 279, - '/', 272, - ';', 188, - '<', 264, - '=', 232, - '>', 266, - 'A', 108, - 'B', 74, - 'C', 70, - 'D', 6, - 'F', 7, - 'G', 144, - 'H', 8, - 'I', 110, - 'J', 125, - 'L', 32, - 'N', 127, - 'O', 111, - 'P', 143, - 'R', 46, - 'S', 33, - 'T', 9, - 'U', 116, - 'V', 10, - 'W', 69, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(0); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); - END_STATE(); - case 1: - if (lookahead == ' ') ADVANCE(85); - END_STATE(); - case 2: - if (lookahead == ' ') ADVANCE(119); - END_STATE(); - case 3: - ADVANCE_MAP( - '"', 283, - '\'', 280, - '(', 226, - ')', 227, - '*', 191, - '-', 271, - 'F', 294, - 'N', 350, - 'T', 359, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(3); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 4: - ADVANCE_MAP( - '.', 279, - 'A', 363, - 'F', 377, - 'I', 344, - 'J', 349, - 'L', 310, - 'O', 342, - 'R', 326, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(4); - if (('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 5: - if (lookahead == '=') ADVANCE(262); - END_STATE(); - case 6: - if (lookahead == 'A') ADVANCE(164); - if (lookahead == 'E') ADVANCE(29); - if (lookahead == 'O') ADVANCE(177); - END_STATE(); - case 7: - if (lookahead == 'A') ADVANCE(86); - if (lookahead == 'L') ADVANCE(131); - if (lookahead == 'R') ADVANCE(128); - if (lookahead == 'U') ADVANCE(92); - END_STATE(); - case 8: - if (lookahead == 'A') ADVANCE(178); - END_STATE(); - case 9: - if (lookahead == 'A') ADVANCE(22); - if (lookahead == 'E') ADVANCE(179); - if (lookahead == 'I') ADVANCE(105); - if (lookahead == 'R') ADVANCE(172); - END_STATE(); - case 10: - if (lookahead == 'A') ADVANCE(101); - END_STATE(); - case 11: - if (lookahead == 'A') ADVANCE(136); - END_STATE(); - case 12: - if (lookahead == 'A') ADVANCE(173); - END_STATE(); - case 13: - if (lookahead == 'A') ADVANCE(104); - END_STATE(); - case 14: - if (lookahead == 'A') ADVANCE(114); - END_STATE(); - case 15: - if (lookahead == 'A') ADVANCE(155); - END_STATE(); - case 16: - if (lookahead == 'A') ADVANCE(140); - END_STATE(); - case 17: - if (lookahead == 'A') ADVANCE(89); - END_STATE(); - case 18: - if (lookahead == 'A') ADVANCE(142); - END_STATE(); - case 19: - if (lookahead == 'A') ADVANCE(167); - END_STATE(); - case 20: - if (lookahead == 'A') ADVANCE(95); - END_STATE(); - case 21: - if (lookahead == 'A') ADVANCE(169); - END_STATE(); - case 22: - if (lookahead == 'B') ADVANCE(96); - END_STATE(); - case 23: - if (lookahead == 'B') ADVANCE(99); - END_STATE(); - case 24: - if (lookahead == 'C') ADVANCE(220); - END_STATE(); - case 25: - if (lookahead == 'C') ADVANCE(219); - END_STATE(); - case 26: - if (lookahead == 'C') ADVANCE(72); - END_STATE(); - case 27: - if (lookahead == 'C') ADVANCE(160); - END_STATE(); - case 28: - if (lookahead == 'C') ADVANCE(52); - END_STATE(); - case 29: - if (lookahead == 'C') ADVANCE(82); - if (lookahead == 'F') ADVANCE(12); - if (lookahead == 'L') ADVANCE(62); - if (lookahead == 'S') ADVANCE(24); - END_STATE(); - case 30: - if (lookahead == 'D') ADVANCE(260); - END_STATE(); - case 31: - if (lookahead == 'D') ADVANCE(21); - END_STATE(); - case 32: - if (lookahead == 'E') ADVANCE(63); - if (lookahead == 'I') ADVANCE(84); - END_STATE(); - case 33: - if (lookahead == 'E') ADVANCE(94); - if (lookahead == 'M') ADVANCE(20); - END_STATE(); - case 34: - if (lookahead == 'E') ADVANCE(179); - if (lookahead == 'I') ADVANCE(105); - END_STATE(); - case 35: - if (lookahead == 'E') ADVANCE(246); - END_STATE(); - case 36: - if (lookahead == 'E') ADVANCE(268); - END_STATE(); - case 37: - if (lookahead == 'E') ADVANCE(288); - END_STATE(); - case 38: - if (lookahead == 'E') ADVANCE(290); - END_STATE(); - case 39: - if (lookahead == 'E') ADVANCE(237); - END_STATE(); - case 40: - if (lookahead == 'E') ADVANCE(210); - END_STATE(); - case 41: - if (lookahead == 'E') ADVANCE(235); - END_STATE(); - case 42: - if (lookahead == 'E') ADVANCE(233); - END_STATE(); - case 43: - if (lookahead == 'E') ADVANCE(250); - END_STATE(); - case 44: - if (lookahead == 'E') ADVANCE(254); - END_STATE(); - case 45: - if (lookahead == 'E') ADVANCE(229); - END_STATE(); - case 46: - if (lookahead == 'E') ADVANCE(64); - if (lookahead == 'I') ADVANCE(66); - END_STATE(); - case 47: - if (lookahead == 'E') ADVANCE(151); - END_STATE(); - case 48: - if (lookahead == 'E') ADVANCE(181); - END_STATE(); - case 49: - if (lookahead == 'E') ADVANCE(27); - END_STATE(); - case 50: - if (lookahead == 'E') ADVANCE(148); - END_STATE(); - case 51: - if (lookahead == 'E') ADVANCE(146); - END_STATE(); - case 52: - if (lookahead == 'E') ADVANCE(149); - END_STATE(); - case 53: - if (lookahead == 'E') ADVANCE(137); - END_STATE(); - case 54: - if (lookahead == 'E') ADVANCE(19); - END_STATE(); - case 55: - if (lookahead == 'E') ADVANCE(118); - END_STATE(); - case 56: - if (lookahead == 'E') ADVANCE(145); - END_STATE(); - case 57: - if (lookahead == 'E') ADVANCE(138); - END_STATE(); - case 58: - if (lookahead == 'E') ADVANCE(139); - END_STATE(); - case 59: - if (lookahead == 'E') ADVANCE(14); - END_STATE(); - case 60: - if (lookahead == 'E') ADVANCE(141); - END_STATE(); - case 61: - if (lookahead == 'E') ADVANCE(147); - END_STATE(); - case 62: - if (lookahead == 'E') ADVANCE(168); - END_STATE(); - case 63: - if (lookahead == 'F') ADVANCE(153); - END_STATE(); - case 64: - if (lookahead == 'F') ADVANCE(61); - END_STATE(); - case 65: - if (lookahead == 'G') ADVANCE(215); - END_STATE(); - case 66: - if (lookahead == 'G') ADVANCE(71); - END_STATE(); - case 67: - if (lookahead == 'G') ADVANCE(77); - END_STATE(); - case 68: - if (lookahead == 'G') ADVANCE(60); - END_STATE(); - case 69: - if (lookahead == 'H') ADVANCE(51); - END_STATE(); - case 70: - if (lookahead == 'H') ADVANCE(11); - if (lookahead == 'R') ADVANCE(54); - END_STATE(); - case 71: - if (lookahead == 'H') ADVANCE(157); - END_STATE(); - case 72: - if (lookahead == 'H') ADVANCE(18); - END_STATE(); - case 73: - if (lookahead == 'I') ADVANCE(67); - if (lookahead == 'O') ADVANCE(130); - END_STATE(); - case 74: - if (lookahead == 'I') ADVANCE(67); - if (lookahead == 'O') ADVANCE(130); - if (lookahead == 'Y') ADVANCE(214); - END_STATE(); - case 75: - if (lookahead == 'I') ADVANCE(113); - END_STATE(); - case 76: - if (lookahead == 'I') ADVANCE(135); - END_STATE(); - case 77: - if (lookahead == 'I') ADVANCE(120); - END_STATE(); - case 78: - if (lookahead == 'I') ADVANCE(106); - END_STATE(); - case 79: - if (lookahead == 'I') ADVANCE(117); - END_STATE(); - case 80: - if (lookahead == 'I') ADVANCE(156); - END_STATE(); - case 81: - if (lookahead == 'I') ADVANCE(121); - END_STATE(); - case 82: - if (lookahead == 'I') ADVANCE(107); - END_STATE(); - case 83: - if (lookahead == 'I') ADVANCE(122); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(83); - END_STATE(); - case 84: - if (lookahead == 'K') ADVANCE(36); - if (lookahead == 'M') ADVANCE(80); - END_STATE(); - case 85: - if (lookahead == 'K') ADVANCE(48); - END_STATE(); - case 86: - if (lookahead == 'L') ADVANCE(150); - END_STATE(); - case 87: - if (lookahead == 'L') ADVANCE(206); - END_STATE(); - case 88: - if (lookahead == 'L') ADVANCE(275); - END_STATE(); - case 89: - if (lookahead == 'L') ADVANCE(251); - END_STATE(); - case 90: - if (lookahead == 'L') ADVANCE(253); - END_STATE(); - case 91: - if (lookahead == 'L') ADVANCE(131); - if (lookahead == 'U') ADVANCE(92); - END_STATE(); - case 92: - if (lookahead == 'L') ADVANCE(87); - END_STATE(); - case 93: - if (lookahead == 'L') ADVANCE(88); - END_STATE(); - case 94: - if (lookahead == 'L') ADVANCE(49); - if (lookahead == 'T') ADVANCE(231); - END_STATE(); - case 95: - if (lookahead == 'L') ADVANCE(102); - END_STATE(); - case 96: - if (lookahead == 'L') ADVANCE(39); - END_STATE(); - case 97: - if (lookahead == 'L') ADVANCE(90); - END_STATE(); - case 98: - if (lookahead == 'L') ADVANCE(161); - END_STATE(); - case 99: - if (lookahead == 'L') ADVANCE(43); - END_STATE(); - case 100: - if (lookahead == 'L') ADVANCE(59); - END_STATE(); - case 101: - if (lookahead == 'L') ADVANCE(174); - if (lookahead == 'R') ADVANCE(26); - END_STATE(); - case 102: - if (lookahead == 'L') ADVANCE(81); - END_STATE(); - case 103: - if (lookahead == 'M') ADVANCE(195); - END_STATE(); - case 104: - if (lookahead == 'M') ADVANCE(134); - END_STATE(); - case 105: - if (lookahead == 'M') ADVANCE(47); - END_STATE(); - case 106: - if (lookahead == 'M') ADVANCE(16); - END_STATE(); - case 107: - if (lookahead == 'M') ADVANCE(17); - END_STATE(); - case 108: - if (lookahead == 'N') ADVANCE(30); - if (lookahead == 'S') ADVANCE(193); - END_STATE(); - case 109: - if (lookahead == 'N') ADVANCE(30); - if (lookahead == 'S') ADVANCE(25); - END_STATE(); - case 110: - if (lookahead == 'N') ADVANCE(123); - if (lookahead == 'S') ADVANCE(273); - END_STATE(); - case 111: - if (lookahead == 'N') ADVANCE(208); - if (lookahead == 'R') ADVANCE(259); - if (lookahead == 'U') ADVANCE(170); - END_STATE(); - case 112: - if (lookahead == 'N') ADVANCE(208); - if (lookahead == 'R') ADVANCE(257); - END_STATE(); - case 113: - if (lookahead == 'N') ADVANCE(197); - END_STATE(); - case 114: - if (lookahead == 'N') ADVANCE(248); - END_STATE(); - case 115: - if (lookahead == 'N') ADVANCE(124); - if (lookahead == 'S') ADVANCE(273); - END_STATE(); - case 116: - if (lookahead == 'N') ADVANCE(76); - if (lookahead == 'P') ADVANCE(31); - END_STATE(); - case 117: - if (lookahead == 'N') ADVANCE(65); - END_STATE(); - case 118: - if (lookahead == 'N') ADVANCE(28); - END_STATE(); - case 119: - if (lookahead == 'N') ADVANCE(176); - END_STATE(); - case 120: - if (lookahead == 'N') ADVANCE(158); - END_STATE(); - case 121: - if (lookahead == 'N') ADVANCE(162); - END_STATE(); - case 122: - if (lookahead == 'N') ADVANCE(165); - END_STATE(); - case 123: - if (lookahead == 'N') ADVANCE(53); - if (lookahead == 'S') ADVANCE(56); - if (lookahead == 'T') ADVANCE(239); - END_STATE(); - case 124: - if (lookahead == 'N') ADVANCE(53); - if (lookahead == 'S') ADVANCE(56); - if (lookahead == 'T') ADVANCE(238); - END_STATE(); - case 125: - if (lookahead == 'O') ADVANCE(75); - END_STATE(); - case 126: - if (lookahead == 'O') ADVANCE(225); - END_STATE(); - case 127: - if (lookahead == 'O') ADVANCE(152); - if (lookahead == 'U') ADVANCE(93); - END_STATE(); - case 128: - if (lookahead == 'O') ADVANCE(103); - END_STATE(); - case 129: - if (lookahead == 'O') ADVANCE(171); - END_STATE(); - case 130: - if (lookahead == 'O') ADVANCE(100); - END_STATE(); - case 131: - if (lookahead == 'O') ADVANCE(15); - END_STATE(); - case 132: - if (lookahead == 'O') ADVANCE(163); - END_STATE(); - case 133: - if (lookahead == 'P') ADVANCE(212); - END_STATE(); - case 134: - if (lookahead == 'P') ADVANCE(247); - END_STATE(); - case 135: - if (lookahead == 'Q') ADVANCE(175); - END_STATE(); - case 136: - if (lookahead == 'R') ADVANCE(245); - END_STATE(); - case 137: - if (lookahead == 'R') ADVANCE(204); - END_STATE(); - case 138: - if (lookahead == 'R') ADVANCE(217); - END_STATE(); - case 139: - if (lookahead == 'R') ADVANCE(201); - END_STATE(); - case 140: - if (lookahead == 'R') ADVANCE(180); - END_STATE(); - case 141: - if (lookahead == 'R') ADVANCE(240); - END_STATE(); - case 142: - if (lookahead == 'R') ADVANCE(243); - END_STATE(); - case 143: - if (lookahead == 'R') ADVANCE(78); - END_STATE(); - case 144: - if (lookahead == 'R') ADVANCE(129); - END_STATE(); - case 145: - if (lookahead == 'R') ADVANCE(159); - END_STATE(); - case 146: - if (lookahead == 'R') ADVANCE(40); - END_STATE(); - case 147: - if (lookahead == 'R') ADVANCE(55); - END_STATE(); - case 148: - if (lookahead == 'S') ADVANCE(228); - END_STATE(); - case 149: - if (lookahead == 'S') ADVANCE(256); - END_STATE(); - case 150: - if (lookahead == 'S') ADVANCE(38); - END_STATE(); - case 151: - if (lookahead == 'S') ADVANCE(166); - END_STATE(); - case 152: - if (lookahead == 'T') ADVANCE(277); - END_STATE(); - case 153: - if (lookahead == 'T') ADVANCE(199); - END_STATE(); - case 154: - if (lookahead == 'T') ADVANCE(244); - END_STATE(); - case 155: - if (lookahead == 'T') ADVANCE(249); - END_STATE(); - case 156: - if (lookahead == 'T') ADVANCE(221); - END_STATE(); - case 157: - if (lookahead == 'T') ADVANCE(202); - END_STATE(); - case 158: - if (lookahead == 'T') ADVANCE(241); - END_STATE(); - case 159: - if (lookahead == 'T') ADVANCE(223); - END_STATE(); - case 160: - if (lookahead == 'T') ADVANCE(189); - END_STATE(); - case 161: - if (lookahead == 'T') ADVANCE(255); - END_STATE(); - case 162: - if (lookahead == 'T') ADVANCE(242); - END_STATE(); - case 163: - if (lookahead == 'T') ADVANCE(2); - END_STATE(); - case 164: - if (lookahead == 'T') ADVANCE(35); - END_STATE(); - case 165: - if (lookahead == 'T') ADVANCE(126); - END_STATE(); - case 166: - if (lookahead == 'T') ADVANCE(13); - END_STATE(); - case 167: - if (lookahead == 'T') ADVANCE(41); - END_STATE(); - case 168: - if (lookahead == 'T') ADVANCE(42); - END_STATE(); - case 169: - if (lookahead == 'T') ADVANCE(45); - END_STATE(); - case 170: - if (lookahead == 'T') ADVANCE(58); - END_STATE(); - case 171: - if (lookahead == 'U') ADVANCE(133); - END_STATE(); - case 172: - if (lookahead == 'U') ADVANCE(37); - END_STATE(); - case 173: - if (lookahead == 'U') ADVANCE(98); - END_STATE(); - case 174: - if (lookahead == 'U') ADVANCE(50); - END_STATE(); - case 175: - if (lookahead == 'U') ADVANCE(44); - END_STATE(); - case 176: - if (lookahead == 'U') ADVANCE(97); - END_STATE(); - case 177: - if (lookahead == 'U') ADVANCE(23); - END_STATE(); - case 178: - if (lookahead == 'V') ADVANCE(79); - END_STATE(); - case 179: - if (lookahead == 'X') ADVANCE(154); - END_STATE(); - case 180: - if (lookahead == 'Y') ADVANCE(1); - END_STATE(); - case 181: - if (lookahead == 'Y') ADVANCE(252); - END_STATE(); - case 182: - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(182); - if (('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 183: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(287); - END_STATE(); - case 184: - if (eof) ADVANCE(187); - ADVANCE_MAP( - '!', 5, - '(', 226, - ')', 227, - '*', 191, - '+', 270, - ',', 192, - '-', 271, - '.', 279, - '/', 272, - ';', 188, - '<', 264, - '=', 232, - '>', 266, - 'A', 109, - 'B', 73, - 'C', 70, - 'D', 6, - 'F', 91, - 'I', 115, - 'J', 125, - 'L', 32, - 'N', 132, - 'O', 112, - 'P', 143, - 'R', 46, - 'S', 33, - 'T', 34, - 'U', 116, - 'V', 10, - 'W', 69, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(184); - END_STATE(); - case 185: - if (eof) ADVANCE(187); - ADVANCE_MAP( - '!', 5, - '(', 226, - '*', 191, - '+', 270, - ',', 192, - '-', 271, - '.', 279, - '/', 272, - ';', 188, - '<', 264, - '=', 232, - '>', 266, - 'A', 338, - 'C', 357, - 'D', 300, - 'F', 353, - 'G', 358, - 'H', 292, - 'I', 339, - 'L', 323, - 'O', 354, - 'S', 316, - 'U', 352, - 'W', 321, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(185); - if (('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 186: - if (eof) ADVANCE(187); - ADVANCE_MAP( - ',', 192, - '.', 279, - ';', 188, - 'A', 363, - 'C', 357, - 'D', 300, - 'F', 377, - 'G', 358, - 'H', 292, - 'I', 343, - 'J', 349, - 'L', 309, - 'O', 360, - 'R', 326, - 'S', 316, - 'U', 352, - 'W', 321, - ); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') SKIP(186); - if (('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 187: - ACCEPT_TOKEN(ts_builtin_sym_end); - END_STATE(); - case 188: - ACCEPT_TOKEN(anon_sym_SEMI); - END_STATE(); - case 189: - ACCEPT_TOKEN(anon_sym_SELECT); - END_STATE(); - case 190: - ACCEPT_TOKEN(anon_sym_SELECT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 191: - ACCEPT_TOKEN(anon_sym_STAR); - END_STATE(); - case 192: - ACCEPT_TOKEN(anon_sym_COMMA); - END_STATE(); - case 193: - ACCEPT_TOKEN(sym_alias_token); - END_STATE(); - case 194: - ACCEPT_TOKEN(sym_alias_token); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 195: - ACCEPT_TOKEN(anon_sym_FROM); - END_STATE(); - case 196: - ACCEPT_TOKEN(anon_sym_FROM); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 197: - ACCEPT_TOKEN(anon_sym_JOIN); - END_STATE(); - case 198: - ACCEPT_TOKEN(anon_sym_JOIN); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 199: - ACCEPT_TOKEN(anon_sym_LEFT); - END_STATE(); - case 200: - ACCEPT_TOKEN(anon_sym_LEFT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 201: - ACCEPT_TOKEN(anon_sym_OUTER); - END_STATE(); - case 202: - ACCEPT_TOKEN(anon_sym_RIGHT); - END_STATE(); - case 203: - ACCEPT_TOKEN(anon_sym_RIGHT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 204: - ACCEPT_TOKEN(anon_sym_INNER); - END_STATE(); - case 205: - ACCEPT_TOKEN(anon_sym_INNER); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 206: - ACCEPT_TOKEN(anon_sym_FULL); - END_STATE(); - case 207: - ACCEPT_TOKEN(anon_sym_FULL); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 208: - ACCEPT_TOKEN(anon_sym_ON); - END_STATE(); - case 209: - ACCEPT_TOKEN(anon_sym_ON); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 210: - ACCEPT_TOKEN(anon_sym_WHERE); - END_STATE(); - case 211: - ACCEPT_TOKEN(anon_sym_WHERE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 212: - ACCEPT_TOKEN(anon_sym_GROUP); - END_STATE(); - case 213: - ACCEPT_TOKEN(anon_sym_GROUP); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 214: - ACCEPT_TOKEN(anon_sym_BY); - END_STATE(); - case 215: - ACCEPT_TOKEN(anon_sym_HAVING); - END_STATE(); - case 216: - ACCEPT_TOKEN(anon_sym_HAVING); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 217: - ACCEPT_TOKEN(anon_sym_ORDER); - END_STATE(); - case 218: - ACCEPT_TOKEN(anon_sym_ORDER); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 219: - ACCEPT_TOKEN(anon_sym_ASC); - END_STATE(); - case 220: - ACCEPT_TOKEN(anon_sym_DESC); - END_STATE(); - case 221: - ACCEPT_TOKEN(anon_sym_LIMIT); - END_STATE(); - case 222: - ACCEPT_TOKEN(anon_sym_LIMIT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 223: - ACCEPT_TOKEN(anon_sym_INSERT); - END_STATE(); - case 224: - ACCEPT_TOKEN(anon_sym_INSERT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 225: - ACCEPT_TOKEN(anon_sym_INTO); - END_STATE(); - case 226: - ACCEPT_TOKEN(anon_sym_LPAREN); - END_STATE(); - case 227: - ACCEPT_TOKEN(anon_sym_RPAREN); - END_STATE(); - case 228: - ACCEPT_TOKEN(anon_sym_VALUES); - END_STATE(); - case 229: - ACCEPT_TOKEN(anon_sym_UPDATE); - END_STATE(); - case 230: - ACCEPT_TOKEN(anon_sym_UPDATE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 231: - ACCEPT_TOKEN(anon_sym_SET); - END_STATE(); - case 232: - ACCEPT_TOKEN(anon_sym_EQ); - END_STATE(); - case 233: - ACCEPT_TOKEN(anon_sym_DELETE); - END_STATE(); - case 234: - ACCEPT_TOKEN(anon_sym_DELETE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 235: - ACCEPT_TOKEN(anon_sym_CREATE); - END_STATE(); - case 236: - ACCEPT_TOKEN(anon_sym_CREATE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 237: - ACCEPT_TOKEN(anon_sym_TABLE); - END_STATE(); - case 238: - ACCEPT_TOKEN(anon_sym_INT); - if (lookahead == 'E') ADVANCE(68); - END_STATE(); - case 239: - ACCEPT_TOKEN(anon_sym_INT); - if (lookahead == 'E') ADVANCE(68); - if (lookahead == 'O') ADVANCE(225); - END_STATE(); - case 240: - ACCEPT_TOKEN(anon_sym_INTEGER); - END_STATE(); - case 241: - ACCEPT_TOKEN(anon_sym_BIGINT); - END_STATE(); - case 242: - ACCEPT_TOKEN(anon_sym_SMALLINT); - END_STATE(); - case 243: - ACCEPT_TOKEN(anon_sym_VARCHAR); - END_STATE(); - case 244: - ACCEPT_TOKEN(anon_sym_TEXT); - END_STATE(); - case 245: - ACCEPT_TOKEN(anon_sym_CHAR); - END_STATE(); - case 246: - ACCEPT_TOKEN(anon_sym_DATE); - END_STATE(); - case 247: - ACCEPT_TOKEN(anon_sym_TIMESTAMP); - END_STATE(); - case 248: - ACCEPT_TOKEN(anon_sym_BOOLEAN); - END_STATE(); - case 249: - ACCEPT_TOKEN(anon_sym_FLOAT); - END_STATE(); - case 250: - ACCEPT_TOKEN(anon_sym_DOUBLE); - END_STATE(); - case 251: - ACCEPT_TOKEN(anon_sym_DECIMAL); - END_STATE(); - case 252: - ACCEPT_TOKEN(anon_sym_PRIMARYKEY); - END_STATE(); - case 253: - ACCEPT_TOKEN(anon_sym_NOTNULL); - END_STATE(); - case 254: - ACCEPT_TOKEN(anon_sym_UNIQUE); - END_STATE(); - case 255: - ACCEPT_TOKEN(anon_sym_DEFAULT); - END_STATE(); - case 256: - ACCEPT_TOKEN(anon_sym_REFERENCES); - END_STATE(); - case 257: - ACCEPT_TOKEN(anon_sym_OR); - END_STATE(); - case 258: - ACCEPT_TOKEN(anon_sym_OR); - if (lookahead == 'D') ADVANCE(313); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 259: - ACCEPT_TOKEN(anon_sym_OR); - if (lookahead == 'D') ADVANCE(57); - END_STATE(); - case 260: - ACCEPT_TOKEN(anon_sym_AND); - END_STATE(); - case 261: - ACCEPT_TOKEN(anon_sym_AND); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 262: - ACCEPT_TOKEN(anon_sym_BANG_EQ); - END_STATE(); - case 263: - ACCEPT_TOKEN(anon_sym_LT_GT); - END_STATE(); - case 264: - ACCEPT_TOKEN(anon_sym_LT); - if (lookahead == '=') ADVANCE(265); - if (lookahead == '>') ADVANCE(263); - END_STATE(); - case 265: - ACCEPT_TOKEN(anon_sym_LT_EQ); - END_STATE(); - case 266: - ACCEPT_TOKEN(anon_sym_GT); - if (lookahead == '=') ADVANCE(267); - END_STATE(); - case 267: - ACCEPT_TOKEN(anon_sym_GT_EQ); - END_STATE(); - case 268: - ACCEPT_TOKEN(anon_sym_LIKE); - END_STATE(); - case 269: - ACCEPT_TOKEN(anon_sym_LIKE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 270: - ACCEPT_TOKEN(anon_sym_PLUS); - END_STATE(); - case 271: - ACCEPT_TOKEN(anon_sym_DASH); - END_STATE(); - case 272: - ACCEPT_TOKEN(anon_sym_SLASH); - END_STATE(); - case 273: - ACCEPT_TOKEN(anon_sym_IS); - END_STATE(); - case 274: - ACCEPT_TOKEN(anon_sym_IS); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 275: - ACCEPT_TOKEN(anon_sym_NULL); - END_STATE(); - case 276: - ACCEPT_TOKEN(anon_sym_NULL); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 277: - ACCEPT_TOKEN(anon_sym_NOT); - END_STATE(); - case 278: - ACCEPT_TOKEN(anon_sym_NOT); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 279: - ACCEPT_TOKEN(anon_sym_DOT); - END_STATE(); - case 280: - ACCEPT_TOKEN(anon_sym_SQUOTE); - END_STATE(); - case 281: - ACCEPT_TOKEN(aux_sym_string_token1); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(281); - if (lookahead != 0 && - lookahead != '\'') ADVANCE(282); - END_STATE(); - case 282: - ACCEPT_TOKEN(aux_sym_string_token1); - if (lookahead != 0 && - lookahead != '\'') ADVANCE(282); - END_STATE(); - case 283: - ACCEPT_TOKEN(anon_sym_DQUOTE); - END_STATE(); - case 284: - ACCEPT_TOKEN(aux_sym_string_token2); - if (('\t' <= lookahead && lookahead <= '\r') || - lookahead == ' ') ADVANCE(284); - if (lookahead != 0 && - lookahead != '"') ADVANCE(285); - END_STATE(); - case 285: - ACCEPT_TOKEN(aux_sym_string_token2); - if (lookahead != 0 && - lookahead != '"') ADVANCE(285); - END_STATE(); - case 286: - ACCEPT_TOKEN(sym_number); - if (lookahead == '.') ADVANCE(183); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(286); - END_STATE(); - case 287: - ACCEPT_TOKEN(sym_number); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(287); - END_STATE(); - case 288: - ACCEPT_TOKEN(anon_sym_TRUE); - END_STATE(); - case 289: - ACCEPT_TOKEN(anon_sym_TRUE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 290: - ACCEPT_TOKEN(anon_sym_FALSE); - END_STATE(); - case 291: - ACCEPT_TOKEN(anon_sym_FALSE); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 292: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'A') ADVANCE(378); - if (('0' <= lookahead && lookahead <= '9') || - ('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 293: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'A') ADVANCE(372); - if (('0' <= lookahead && lookahead <= '9') || - ('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 294: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'A') ADVANCE(335); - if (('0' <= lookahead && lookahead <= '9') || - ('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 295: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'A') ADVANCE(374); - if (('0' <= lookahead && lookahead <= '9') || - ('B' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 296: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'C') ADVANCE(368); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 297: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'D') ADVANCE(261); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 298: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'D') ADVANCE(313); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 299: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'D') ADVANCE(295); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 300: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(331); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 301: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(269); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 302: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(296); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 303: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(211); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 304: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(236); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 305: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(234); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 306: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(230); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 307: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(289); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 308: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(291); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 309: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(318); - if (lookahead == 'I') ADVANCE(337); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 310: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(318); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 311: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(293); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 312: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(361); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 313: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(355); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 314: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(356); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 315: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(362); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 316: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(334); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 317: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'E') ADVANCE(373); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 318: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'F') ADVANCE(370); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 319: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'G') ADVANCE(216); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 320: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'G') ADVANCE(322); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 321: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'H') ADVANCE(315); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 322: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'H') ADVANCE(371); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 323: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'I') ADVANCE(328); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 324: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'I') ADVANCE(340); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 325: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'I') ADVANCE(366); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 326: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'I') ADVANCE(320); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 327: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'I') ADVANCE(341); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 328: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'K') ADVANCE(301); - if (lookahead == 'M') ADVANCE(325); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 329: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(276); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 330: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(207); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 331: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(317); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 332: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(329); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 333: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(330); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 334: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(302); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 335: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'L') ADVANCE(365); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 336: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'M') ADVANCE(196); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 337: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'M') ADVANCE(325); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 338: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(297); - if (lookahead == 'S') ADVANCE(194); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 339: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(364); - if (lookahead == 'S') ADVANCE(274); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 340: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(319); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 341: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(198); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 342: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(209); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 343: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(345); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 344: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(346); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 345: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(314); - if (lookahead == 'S') ADVANCE(312); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 346: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'N') ADVANCE(314); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 347: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'O') ADVANCE(336); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 348: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'O') ADVANCE(375); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 349: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'O') ADVANCE(327); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 350: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'O') ADVANCE(369); - if (lookahead == 'U') ADVANCE(332); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 351: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'P') ADVANCE(213); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 352: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'P') ADVANCE(299); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 353: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(347); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 354: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(258); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 355: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(218); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 356: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(205); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 357: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(311); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 358: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(348); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 359: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(376); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 360: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(298); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 361: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(367); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 362: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'R') ADVANCE(303); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 363: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'S') ADVANCE(194); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 364: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'S') ADVANCE(312); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 365: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'S') ADVANCE(308); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 366: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(222); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 367: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(224); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 368: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(190); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 369: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(278); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 370: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(200); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 371: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(203); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 372: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(304); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 373: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(305); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 374: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'T') ADVANCE(306); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 375: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'U') ADVANCE(351); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 376: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'U') ADVANCE(307); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 377: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'U') ADVANCE(333); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 378: - ACCEPT_TOKEN(sym_identifier); - if (lookahead == 'V') ADVANCE(324); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - case 379: - ACCEPT_TOKEN(sym_identifier); - if (('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(379); - END_STATE(); - default: - return false; - } -} - -static const TSLexMode ts_lex_modes[STATE_COUNT] = { - [0] = {.lex_state = 0}, - [1] = {.lex_state = 0}, - [2] = {.lex_state = 184}, - [3] = {.lex_state = 184}, - [4] = {.lex_state = 184}, - [5] = {.lex_state = 184}, - [6] = {.lex_state = 184}, - [7] = {.lex_state = 184}, - [8] = {.lex_state = 184}, - [9] = {.lex_state = 184}, - [10] = {.lex_state = 184}, - [11] = {.lex_state = 184}, - [12] = {.lex_state = 184}, - [13] = {.lex_state = 184}, - [14] = {.lex_state = 184}, - [15] = {.lex_state = 184}, - [16] = {.lex_state = 184}, - [17] = {.lex_state = 184}, - [18] = {.lex_state = 184}, - [19] = {.lex_state = 184}, - [20] = {.lex_state = 0}, - [21] = {.lex_state = 0}, - [22] = {.lex_state = 0}, - [23] = {.lex_state = 0}, - [24] = {.lex_state = 0}, - [25] = {.lex_state = 0}, - [26] = {.lex_state = 185}, - [27] = {.lex_state = 0}, - [28] = {.lex_state = 0}, - [29] = {.lex_state = 0}, - [30] = {.lex_state = 0}, - [31] = {.lex_state = 0}, - [32] = {.lex_state = 0}, - [33] = {.lex_state = 0}, - [34] = {.lex_state = 0}, - [35] = {.lex_state = 0}, - [36] = {.lex_state = 0}, - [37] = {.lex_state = 0}, - [38] = {.lex_state = 0}, - [39] = {.lex_state = 0}, - [40] = {.lex_state = 0}, - [41] = {.lex_state = 0}, - [42] = {.lex_state = 185}, - [43] = {.lex_state = 185}, - [44] = {.lex_state = 185}, - [45] = {.lex_state = 185}, - [46] = {.lex_state = 185}, - [47] = {.lex_state = 185}, - [48] = {.lex_state = 185}, - [49] = {.lex_state = 185}, - [50] = {.lex_state = 185}, - [51] = {.lex_state = 185}, - [52] = {.lex_state = 185}, - [53] = {.lex_state = 185}, - [54] = {.lex_state = 185}, - [55] = {.lex_state = 185}, - [56] = {.lex_state = 185}, - [57] = {.lex_state = 185}, - [58] = {.lex_state = 185}, - [59] = {.lex_state = 185}, - [60] = {.lex_state = 0}, - [61] = {.lex_state = 184}, - [62] = {.lex_state = 0}, - [63] = {.lex_state = 0}, - [64] = {.lex_state = 184}, - [65] = {.lex_state = 0}, - [66] = {.lex_state = 3}, - [67] = {.lex_state = 184}, - [68] = {.lex_state = 184}, - [69] = {.lex_state = 184}, - [70] = {.lex_state = 184}, - [71] = {.lex_state = 3}, - [72] = {.lex_state = 184}, - [73] = {.lex_state = 3}, - [74] = {.lex_state = 3}, - [75] = {.lex_state = 3}, - [76] = {.lex_state = 3}, - [77] = {.lex_state = 3}, - [78] = {.lex_state = 0}, - [79] = {.lex_state = 186}, - [80] = {.lex_state = 186}, - [81] = {.lex_state = 3}, - [82] = {.lex_state = 3}, - [83] = {.lex_state = 3}, - [84] = {.lex_state = 0}, - [85] = {.lex_state = 3}, - [86] = {.lex_state = 3}, - [87] = {.lex_state = 3}, - [88] = {.lex_state = 3}, - [89] = {.lex_state = 3}, - [90] = {.lex_state = 3}, - [91] = {.lex_state = 3}, - [92] = {.lex_state = 3}, - [93] = {.lex_state = 3}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 3}, - [96] = {.lex_state = 186}, - [97] = {.lex_state = 3}, - [98] = {.lex_state = 3}, - [99] = {.lex_state = 3}, - [100] = {.lex_state = 0}, - [101] = {.lex_state = 3}, - [102] = {.lex_state = 3}, - [103] = {.lex_state = 3}, - [104] = {.lex_state = 3}, - [105] = {.lex_state = 3}, - [106] = {.lex_state = 3}, - [107] = {.lex_state = 3}, - [108] = {.lex_state = 3}, - [109] = {.lex_state = 3}, - [110] = {.lex_state = 3}, - [111] = {.lex_state = 3}, - [112] = {.lex_state = 3}, - [113] = {.lex_state = 3}, - [114] = {.lex_state = 3}, - [115] = {.lex_state = 3}, - [116] = {.lex_state = 3}, - [117] = {.lex_state = 3}, - [118] = {.lex_state = 3}, - [119] = {.lex_state = 3}, - [120] = {.lex_state = 3}, - [121] = {.lex_state = 3}, - [122] = {.lex_state = 3}, - [123] = {.lex_state = 3}, - [124] = {.lex_state = 184}, - [125] = {.lex_state = 0}, - [126] = {.lex_state = 0}, - [127] = {.lex_state = 0}, - [128] = {.lex_state = 0}, - [129] = {.lex_state = 184}, - [130] = {.lex_state = 184}, - [131] = {.lex_state = 184}, - [132] = {.lex_state = 184}, - [133] = {.lex_state = 184}, - [134] = {.lex_state = 184}, - [135] = {.lex_state = 0}, - [136] = {.lex_state = 184}, - [137] = {.lex_state = 184}, - [138] = {.lex_state = 184}, - [139] = {.lex_state = 0}, - [140] = {.lex_state = 184}, - [141] = {.lex_state = 184}, - [142] = {.lex_state = 184}, - [143] = {.lex_state = 0}, - [144] = {.lex_state = 0}, - [145] = {.lex_state = 0}, - [146] = {.lex_state = 0}, - [147] = {.lex_state = 0}, - [148] = {.lex_state = 0}, - [149] = {.lex_state = 184}, - [150] = {.lex_state = 0}, - [151] = {.lex_state = 0}, - [152] = {.lex_state = 0}, - [153] = {.lex_state = 0}, - [154] = {.lex_state = 0}, - [155] = {.lex_state = 0}, - [156] = {.lex_state = 0}, - [157] = {.lex_state = 0}, - [158] = {.lex_state = 0}, - [159] = {.lex_state = 0}, - [160] = {.lex_state = 0}, - [161] = {.lex_state = 0}, - [162] = {.lex_state = 0}, - [163] = {.lex_state = 0}, - [164] = {.lex_state = 0}, - [165] = {.lex_state = 0}, - [166] = {.lex_state = 0}, - [167] = {.lex_state = 0}, - [168] = {.lex_state = 0}, - [169] = {.lex_state = 0}, - [170] = {.lex_state = 0}, - [171] = {.lex_state = 0}, - [172] = {.lex_state = 0}, - [173] = {.lex_state = 0}, - [174] = {.lex_state = 0}, - [175] = {.lex_state = 0}, - [176] = {.lex_state = 0}, - [177] = {.lex_state = 0}, - [178] = {.lex_state = 0}, - [179] = {.lex_state = 0}, - [180] = {.lex_state = 184}, - [181] = {.lex_state = 4}, - [182] = {.lex_state = 0}, - [183] = {.lex_state = 0}, - [184] = {.lex_state = 0}, - [185] = {.lex_state = 0}, - [186] = {.lex_state = 4}, - [187] = {.lex_state = 0}, - [188] = {.lex_state = 184}, - [189] = {.lex_state = 0}, - [190] = {.lex_state = 0}, - [191] = {.lex_state = 0}, - [192] = {.lex_state = 0}, - [193] = {.lex_state = 184}, - [194] = {.lex_state = 0}, - [195] = {.lex_state = 0}, - [196] = {.lex_state = 0}, - [197] = {.lex_state = 4}, - [198] = {.lex_state = 0}, - [199] = {.lex_state = 0}, - [200] = {.lex_state = 184}, - [201] = {.lex_state = 184}, - [202] = {.lex_state = 0}, - [203] = {.lex_state = 0}, - [204] = {.lex_state = 0}, - [205] = {.lex_state = 0}, - [206] = {.lex_state = 0}, - [207] = {.lex_state = 0}, - [208] = {.lex_state = 184}, - [209] = {.lex_state = 0}, - [210] = {.lex_state = 184}, - [211] = {.lex_state = 0}, - [212] = {.lex_state = 0}, - [213] = {.lex_state = 0}, - [214] = {.lex_state = 0}, - [215] = {.lex_state = 0}, - [216] = {.lex_state = 0}, - [217] = {.lex_state = 0}, - [218] = {.lex_state = 0}, - [219] = {.lex_state = 0}, - [220] = {.lex_state = 184}, - [221] = {.lex_state = 0}, - [222] = {.lex_state = 0}, - [223] = {.lex_state = 0}, - [224] = {.lex_state = 184}, - [225] = {.lex_state = 0}, - [226] = {.lex_state = 0}, - [227] = {.lex_state = 0}, - [228] = {.lex_state = 0}, - [229] = {.lex_state = 0}, - [230] = {.lex_state = 0}, - [231] = {.lex_state = 0}, - [232] = {.lex_state = 182}, - [233] = {.lex_state = 182}, - [234] = {.lex_state = 182}, - [235] = {.lex_state = 182}, - [236] = {.lex_state = 182}, - [237] = {.lex_state = 182}, - [238] = {.lex_state = 182}, - [239] = {.lex_state = 182}, - [240] = {.lex_state = 0}, - [241] = {.lex_state = 0}, - [242] = {.lex_state = 0}, - [243] = {.lex_state = 0}, - [244] = {.lex_state = 0}, - [245] = {.lex_state = 0}, - [246] = {.lex_state = 0}, - [247] = {.lex_state = 0}, - [248] = {.lex_state = 0}, - [249] = {.lex_state = 0}, - [250] = {.lex_state = 0}, - [251] = {.lex_state = 0}, - [252] = {.lex_state = 0}, - [253] = {.lex_state = 0}, - [254] = {.lex_state = 0}, - [255] = {.lex_state = 0}, - [256] = {.lex_state = 0}, - [257] = {.lex_state = 0}, - [258] = {.lex_state = 0}, - [259] = {.lex_state = 0}, - [260] = {.lex_state = 0}, - [261] = {.lex_state = 182}, - [262] = {.lex_state = 0}, - [263] = {.lex_state = 0}, - [264] = {.lex_state = 182}, - [265] = {.lex_state = 0}, - [266] = {.lex_state = 0}, - [267] = {.lex_state = 0}, - [268] = {.lex_state = 0}, - [269] = {.lex_state = 182}, - [270] = {.lex_state = 0}, - [271] = {.lex_state = 182}, - [272] = {.lex_state = 0}, - [273] = {.lex_state = 182}, - [274] = {.lex_state = 0}, - [275] = {.lex_state = 182}, - [276] = {.lex_state = 182}, - [277] = {.lex_state = 182}, - [278] = {.lex_state = 182}, - [279] = {.lex_state = 0}, - [280] = {.lex_state = 281}, - [281] = {.lex_state = 0}, - [282] = {.lex_state = 182}, - [283] = {.lex_state = 0}, - [284] = {.lex_state = 284}, - [285] = {.lex_state = 0}, - [286] = {.lex_state = 0}, - [287] = {.lex_state = 0}, - [288] = {.lex_state = 0}, - [289] = {.lex_state = 182}, - [290] = {.lex_state = 182}, - [291] = {.lex_state = 0}, - [292] = {.lex_state = 182}, - [293] = {.lex_state = 0}, - [294] = {.lex_state = 0}, - [295] = {.lex_state = 0}, - [296] = {.lex_state = 0}, - [297] = {.lex_state = 0}, - [298] = {.lex_state = 182}, - [299] = {.lex_state = 0}, - [300] = {.lex_state = 0}, - [301] = {.lex_state = 182}, - [302] = {.lex_state = 0}, - [303] = {.lex_state = 182}, - [304] = {.lex_state = 0}, - [305] = {.lex_state = 0}, - [306] = {.lex_state = 0}, - [307] = {.lex_state = 182}, - [308] = {.lex_state = 0}, - [309] = {.lex_state = 182}, - [310] = {.lex_state = 0}, - [311] = {.lex_state = 0}, - [312] = {.lex_state = 0}, - [313] = {.lex_state = 0}, - [314] = {.lex_state = 182}, - [315] = {.lex_state = 281}, - [316] = {.lex_state = 284}, - [317] = {.lex_state = 182}, - [318] = {.lex_state = 0}, - [319] = {.lex_state = 0}, - [320] = {.lex_state = 83}, - [321] = {.lex_state = 0}, - [322] = {.lex_state = 284}, - [323] = {.lex_state = 182}, - [324] = {.lex_state = 0}, - [325] = {.lex_state = 281}, - [326] = {.lex_state = 0}, - [327] = {.lex_state = 0}, - [328] = {.lex_state = 0}, - [329] = {.lex_state = 0}, - [330] = {.lex_state = 0}, -}; - -static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { - [0] = { - [ts_builtin_sym_end] = ACTIONS(1), - [anon_sym_SEMI] = ACTIONS(1), - [anon_sym_SELECT] = ACTIONS(1), - [anon_sym_STAR] = ACTIONS(1), - [anon_sym_COMMA] = ACTIONS(1), - [sym_alias_token] = ACTIONS(1), - [anon_sym_FROM] = ACTIONS(1), - [anon_sym_JOIN] = ACTIONS(1), - [anon_sym_LEFT] = ACTIONS(1), - [anon_sym_OUTER] = ACTIONS(1), - [anon_sym_RIGHT] = ACTIONS(1), - [anon_sym_INNER] = ACTIONS(1), - [anon_sym_FULL] = ACTIONS(1), - [anon_sym_ON] = ACTIONS(1), - [anon_sym_WHERE] = ACTIONS(1), - [anon_sym_GROUP] = ACTIONS(1), - [anon_sym_BY] = ACTIONS(1), - [anon_sym_HAVING] = ACTIONS(1), - [anon_sym_ORDER] = ACTIONS(1), - [anon_sym_DESC] = ACTIONS(1), - [anon_sym_LIMIT] = ACTIONS(1), - [anon_sym_INSERT] = ACTIONS(1), - [anon_sym_INTO] = ACTIONS(1), - [anon_sym_LPAREN] = ACTIONS(1), - [anon_sym_RPAREN] = ACTIONS(1), - [anon_sym_VALUES] = ACTIONS(1), - [anon_sym_UPDATE] = ACTIONS(1), - [anon_sym_SET] = ACTIONS(1), - [anon_sym_EQ] = ACTIONS(1), - [anon_sym_DELETE] = ACTIONS(1), - [anon_sym_CREATE] = ACTIONS(1), - [anon_sym_TABLE] = ACTIONS(1), - [anon_sym_INT] = ACTIONS(1), - [anon_sym_INTEGER] = ACTIONS(1), - [anon_sym_BIGINT] = ACTIONS(1), - [anon_sym_SMALLINT] = ACTIONS(1), - [anon_sym_VARCHAR] = ACTIONS(1), - [anon_sym_TEXT] = ACTIONS(1), - [anon_sym_CHAR] = ACTIONS(1), - [anon_sym_DATE] = ACTIONS(1), - [anon_sym_TIMESTAMP] = ACTIONS(1), - [anon_sym_BOOLEAN] = ACTIONS(1), - [anon_sym_FLOAT] = ACTIONS(1), - [anon_sym_DOUBLE] = ACTIONS(1), - [anon_sym_DECIMAL] = ACTIONS(1), - [anon_sym_PRIMARYKEY] = ACTIONS(1), - [anon_sym_UNIQUE] = ACTIONS(1), - [anon_sym_DEFAULT] = ACTIONS(1), - [anon_sym_REFERENCES] = ACTIONS(1), - [anon_sym_OR] = ACTIONS(1), - [anon_sym_AND] = ACTIONS(1), - [anon_sym_BANG_EQ] = ACTIONS(1), - [anon_sym_LT_GT] = ACTIONS(1), - [anon_sym_LT] = ACTIONS(1), - [anon_sym_LT_EQ] = ACTIONS(1), - [anon_sym_GT] = ACTIONS(1), - [anon_sym_GT_EQ] = ACTIONS(1), - [anon_sym_LIKE] = ACTIONS(1), - [anon_sym_PLUS] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), - [anon_sym_SLASH] = ACTIONS(1), - [anon_sym_IS] = ACTIONS(1), - [anon_sym_NULL] = ACTIONS(1), - [anon_sym_NOT] = ACTIONS(1), - [anon_sym_DOT] = ACTIONS(1), - [anon_sym_SQUOTE] = ACTIONS(1), - [anon_sym_DQUOTE] = ACTIONS(1), - [sym_number] = ACTIONS(1), - [anon_sym_TRUE] = ACTIONS(1), - [anon_sym_FALSE] = ACTIONS(1), - }, - [1] = { - [sym_source_file] = STATE(318), - [sym__statement] = STATE(157), - [sym_select_statement] = STATE(213), - [sym_insert_statement] = STATE(213), - [sym_update_statement] = STATE(213), - [sym_delete_statement] = STATE(213), - [sym_create_table_statement] = STATE(213), - [aux_sym_source_file_repeat1] = STATE(157), - [ts_builtin_sym_end] = ACTIONS(3), - [anon_sym_SELECT] = ACTIONS(5), - [anon_sym_INSERT] = ACTIONS(7), - [anon_sym_UPDATE] = ACTIONS(9), - [anon_sym_DELETE] = ACTIONS(11), - [anon_sym_CREATE] = ACTIONS(13), - }, -}; - -static const uint16_t ts_small_parse_table[] = { - [0] = 4, - ACTIONS(17), 1, - anon_sym_LPAREN, - ACTIONS(21), 1, - anon_sym_DOT, - ACTIONS(19), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(15), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [50] = 2, - ACTIONS(25), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(23), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [94] = 2, - ACTIONS(29), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(27), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [138] = 2, - ACTIONS(33), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(31), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [182] = 2, - ACTIONS(37), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(35), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [226] = 2, - ACTIONS(41), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(39), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [270] = 2, - ACTIONS(45), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(43), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [314] = 2, - ACTIONS(49), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(47), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [358] = 2, - ACTIONS(53), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(51), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [402] = 2, - ACTIONS(57), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [446] = 4, - ACTIONS(57), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(55), 33, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_IS, - [494] = 7, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(55), 25, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - [548] = 6, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(55), 26, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - [600] = 3, - ACTIONS(57), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(55), 35, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_IS, - [646] = 2, - ACTIONS(57), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [690] = 2, - ACTIONS(73), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(71), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [734] = 2, - ACTIONS(77), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(75), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [778] = 2, - ACTIONS(81), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(79), 37, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_ASC, - anon_sym_DESC, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_RPAREN, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - anon_sym_OR, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [822] = 4, - ACTIONS(83), 1, - anon_sym_LPAREN, - ACTIONS(85), 1, - anon_sym_DOT, - ACTIONS(19), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(15), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [866] = 3, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(57), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 28, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_IS, - [906] = 2, - ACTIONS(81), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(79), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [944] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(89), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [994] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(103), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [1044] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(105), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [1094] = 4, - ACTIONS(107), 1, - anon_sym_LPAREN, - ACTIONS(109), 1, - anon_sym_DOT, - ACTIONS(15), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(19), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1136] = 2, - ACTIONS(33), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(31), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1174] = 2, - ACTIONS(29), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(27), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1212] = 2, - ACTIONS(25), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(23), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1250] = 2, - ACTIONS(37), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(35), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1288] = 2, - ACTIONS(41), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(39), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1326] = 2, - ACTIONS(45), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(43), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1364] = 2, - ACTIONS(49), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(47), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1402] = 2, - ACTIONS(53), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(51), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1440] = 2, - ACTIONS(57), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1478] = 4, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(57), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 26, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_IS, - [1520] = 8, - ACTIONS(57), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(55), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [1570] = 7, - ACTIONS(57), 1, - anon_sym_OR, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(55), 19, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - [1618] = 2, - ACTIONS(57), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(55), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1656] = 2, - ACTIONS(73), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(71), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1694] = 2, - ACTIONS(77), 3, - anon_sym_OR, - anon_sym_LT, - anon_sym_GT, - ACTIONS(75), 30, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_EQ, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_AND, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - anon_sym_IS, - [1732] = 12, - ACTIONS(117), 1, - sym_alias_token, - ACTIONS(121), 1, - anon_sym_OR, - ACTIONS(123), 1, - anon_sym_AND, - ACTIONS(129), 1, - anon_sym_IS, - ACTIONS(131), 1, - sym_identifier, - STATE(152), 1, - sym_alias_suffix, - ACTIONS(115), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(127), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(111), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(125), 3, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - ACTIONS(119), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(113), 11, - anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [1789] = 2, - ACTIONS(51), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(53), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1825] = 2, - ACTIONS(23), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(25), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1861] = 2, - ACTIONS(39), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(41), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1897] = 2, - ACTIONS(43), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(45), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1933] = 2, - ACTIONS(47), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(49), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [1969] = 2, - ACTIONS(31), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(33), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2005] = 2, - ACTIONS(55), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(57), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2041] = 2, - ACTIONS(75), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(77), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2077] = 2, - ACTIONS(79), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(81), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2113] = 4, - ACTIONS(115), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(127), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(55), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(57), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2153] = 3, - ACTIONS(115), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(55), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(57), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2191] = 2, - ACTIONS(55), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(57), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2227] = 2, - ACTIONS(71), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(73), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2263] = 2, - ACTIONS(27), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(29), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2299] = 7, - ACTIONS(129), 1, - anon_sym_IS, - ACTIONS(115), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(127), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(55), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(125), 3, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - ACTIONS(119), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(57), 15, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - sym_identifier, - [2345] = 2, - ACTIONS(35), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_STAR, - anon_sym_COMMA, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_PLUS, - anon_sym_DASH, - anon_sym_SLASH, - ACTIONS(37), 19, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - anon_sym_AND, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - anon_sym_IS, - sym_identifier, - [2381] = 8, - ACTIONS(123), 1, - anon_sym_AND, - ACTIONS(129), 1, - anon_sym_IS, - ACTIONS(115), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(127), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(55), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(125), 3, - anon_sym_LT, - anon_sym_GT, - anon_sym_LIKE, - ACTIONS(119), 5, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - ACTIONS(57), 14, - anon_sym_SELECT, - sym_alias_token, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_OR, - sym_identifier, - [2429] = 10, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(135), 1, - anon_sym_COMMA, - STATE(158), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(133), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2477] = 9, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(139), 2, - anon_sym_ASC, - anon_sym_DESC, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(137), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2522] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(143), 11, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2565] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(145), 11, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2608] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(147), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_WHERE, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2649] = 8, - ACTIONS(93), 1, - anon_sym_OR, - ACTIONS(95), 1, - anon_sym_AND, - ACTIONS(101), 1, - anon_sym_IS, - ACTIONS(87), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(97), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(99), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(91), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(149), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2690] = 14, - ACTIONS(151), 1, - anon_sym_STAR, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - STATE(126), 1, - sym__select_elements, - STATE(143), 1, - sym__select_element, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(42), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2742] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(143), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [2781] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(171), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [2820] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(89), 7, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [2859] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(105), 7, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [2898] = 13, - ACTIONS(173), 1, - anon_sym_STAR, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(177), 1, - anon_sym_RPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(132), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [2947] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - ACTIONS(103), 7, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [2986] = 13, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(195), 1, - anon_sym_STAR, - ACTIONS(197), 1, - anon_sym_RPAREN, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(133), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3035] = 13, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(199), 1, - anon_sym_STAR, - ACTIONS(201), 1, - anon_sym_RPAREN, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(134), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3084] = 12, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - STATE(167), 1, - sym_order_by_element, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(61), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3130] = 12, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - STATE(189), 1, - sym_order_by_element, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(61), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3176] = 12, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - STATE(148), 1, - sym__select_element, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(42), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3222] = 8, - ACTIONS(205), 1, - anon_sym_COMMA, - ACTIONS(207), 1, - anon_sym_JOIN, - ACTIONS(211), 1, - anon_sym_INNER, - STATE(128), 1, - sym_join_list, - STATE(135), 1, - sym_join_table, - STATE(151), 1, - aux_sym__from_clause_repeat1, - ACTIONS(209), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - ACTIONS(203), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [3260] = 5, - ACTIONS(117), 1, - sym_alias_token, - ACTIONS(131), 1, - sym_identifier, - STATE(127), 1, - sym_alias_suffix, - ACTIONS(213), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(215), 15, - anon_sym_SELECT, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [3292] = 3, - ACTIONS(221), 1, - anon_sym_DOT, - ACTIONS(217), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(219), 17, - anon_sym_SELECT, - sym_alias_token, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - sym_identifier, - [3320] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(62), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3363] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(140), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3406] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(49), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3449] = 1, - ACTIONS(241), 20, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [3472] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(11), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3515] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(12), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3558] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(13), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3601] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(14), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3644] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(15), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3687] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(52), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3730] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(59), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3773] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(57), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3816] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(53), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3859] = 1, - ACTIONS(243), 20, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [3882] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(138), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3925] = 2, - ACTIONS(245), 3, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_COMMA, - ACTIONS(247), 17, - anon_sym_SELECT, - sym_alias_token, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - sym_identifier, - [3950] = 11, - ACTIONS(153), 1, - anon_sym_LPAREN, - ACTIONS(155), 1, - anon_sym_DASH, - ACTIONS(157), 1, - anon_sym_NULL, - ACTIONS(159), 1, - anon_sym_NOT, - ACTIONS(161), 1, - anon_sym_SQUOTE, - ACTIONS(163), 1, - anon_sym_DQUOTE, - ACTIONS(165), 1, - sym_number, - ACTIONS(169), 1, - sym_identifier, - ACTIONS(167), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(44), 3, - sym_string, - sym_boolean, - sym_null, - STATE(58), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [3993] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(136), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4036] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(64), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4079] = 6, - ACTIONS(207), 1, - anon_sym_JOIN, - ACTIONS(211), 1, - anon_sym_INNER, - STATE(128), 1, - sym_join_list, - STATE(135), 1, - sym_join_table, - ACTIONS(209), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - ACTIONS(249), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [4112] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(141), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4155] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(35), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4198] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(36), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4241] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(37), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4284] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(38), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4327] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(21), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4370] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(23), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4413] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(68), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4456] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(24), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4499] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(131), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4542] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(60), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4585] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(25), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4628] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(137), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4671] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(6), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4714] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(129), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4757] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(67), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4800] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(63), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4843] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(69), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4886] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(72), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4929] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(70), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [4972] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(30), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [5015] = 11, - ACTIONS(175), 1, - anon_sym_LPAREN, - ACTIONS(179), 1, - anon_sym_DASH, - ACTIONS(181), 1, - anon_sym_NULL, - ACTIONS(183), 1, - anon_sym_NOT, - ACTIONS(185), 1, - anon_sym_SQUOTE, - ACTIONS(187), 1, - anon_sym_DQUOTE, - ACTIONS(189), 1, - sym_number, - ACTIONS(193), 1, - sym_identifier, - ACTIONS(191), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(3), 3, - sym_string, - sym_boolean, - sym_null, - STATE(142), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [5058] = 11, - ACTIONS(223), 1, - anon_sym_LPAREN, - ACTIONS(225), 1, - anon_sym_DASH, - ACTIONS(227), 1, - anon_sym_NULL, - ACTIONS(229), 1, - anon_sym_NOT, - ACTIONS(231), 1, - anon_sym_SQUOTE, - ACTIONS(233), 1, - anon_sym_DQUOTE, - ACTIONS(235), 1, - sym_number, - ACTIONS(239), 1, - sym_identifier, - ACTIONS(237), 2, - anon_sym_TRUE, - anon_sym_FALSE, - STATE(29), 3, - sym_string, - sym_boolean, - sym_null, - STATE(65), 7, - sym__expression, - sym_binary_expression, - sym_unary_expression, - sym_parenthesized_expression, - sym_function_call, - sym_column_reference, - sym_literal, - [5101] = 2, - ACTIONS(251), 1, - anon_sym_DOT, - ACTIONS(217), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_WHERE, - anon_sym_INSERT, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_VALUES, - anon_sym_UPDATE, - anon_sym_SET, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [5125] = 1, - ACTIONS(253), 19, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5147] = 13, - ACTIONS(257), 1, - anon_sym_FROM, - ACTIONS(259), 1, - anon_sym_WHERE, - ACTIONS(261), 1, - anon_sym_GROUP, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(139), 1, - sym__from_clause, - STATE(145), 1, - sym__where_clause, - STATE(153), 1, - sym__group_by_clause, - STATE(164), 1, - sym__having_clause, - STATE(183), 1, - sym__order_by_clause, - STATE(212), 1, - sym__limit_clause, - ACTIONS(255), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5193] = 1, - ACTIONS(269), 19, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5215] = 1, - ACTIONS(271), 19, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5237] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(275), 1, - anon_sym_RPAREN, - STATE(260), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5276] = 1, - ACTIONS(245), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_WHERE, - anon_sym_INSERT, - anon_sym_LPAREN, - anon_sym_RPAREN, - anon_sym_VALUES, - anon_sym_UPDATE, - anon_sym_SET, - anon_sym_DELETE, - anon_sym_CREATE, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [5297] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(277), 1, - anon_sym_RPAREN, - STATE(251), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5336] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(279), 1, - anon_sym_RPAREN, - STATE(246), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5375] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(281), 1, - anon_sym_RPAREN, - STATE(250), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5414] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(283), 1, - anon_sym_RPAREN, - STATE(255), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5453] = 1, - ACTIONS(285), 18, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5474] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(287), 1, - anon_sym_RPAREN, - STATE(249), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5513] = 10, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(289), 1, - anon_sym_RPAREN, - STATE(256), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5552] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(145), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5586] = 11, - ACTIONS(259), 1, - anon_sym_WHERE, - ACTIONS(261), 1, - anon_sym_GROUP, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(146), 1, - sym__where_clause, - STATE(154), 1, - sym__group_by_clause, - STATE(165), 1, - sym__having_clause, - STATE(179), 1, - sym__order_by_clause, - STATE(227), 1, - sym__limit_clause, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5626] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(293), 1, - anon_sym_RPAREN, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5659] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(295), 1, - anon_sym_RPAREN, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5692] = 8, - ACTIONS(65), 1, - anon_sym_AND, - ACTIONS(69), 1, - anon_sym_IS, - ACTIONS(141), 1, - anon_sym_OR, - ACTIONS(297), 1, - anon_sym_RPAREN, - ACTIONS(59), 2, - anon_sym_STAR, - anon_sym_SLASH, - ACTIONS(61), 2, - anon_sym_PLUS, - anon_sym_DASH, - ACTIONS(67), 2, - anon_sym_LT, - anon_sym_GT, - ACTIONS(63), 6, - anon_sym_EQ, - anon_sym_BANG_EQ, - anon_sym_LT_GT, - anon_sym_LT_EQ, - anon_sym_GT_EQ, - anon_sym_LIKE, - [5725] = 3, - ACTIONS(301), 1, - anon_sym_COMMA, - STATE(147), 1, - aux_sym__select_elements_repeat1, - ACTIONS(299), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5747] = 3, - ACTIONS(305), 1, - anon_sym_COMMA, - STATE(144), 1, - aux_sym__select_elements_repeat1, - ACTIONS(303), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5769] = 9, - ACTIONS(261), 1, - anon_sym_GROUP, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(154), 1, - sym__group_by_clause, - STATE(165), 1, - sym__having_clause, - STATE(179), 1, - sym__order_by_clause, - STATE(227), 1, - sym__limit_clause, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5803] = 9, - ACTIONS(261), 1, - anon_sym_GROUP, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(155), 1, - sym__group_by_clause, - STATE(163), 1, - sym__having_clause, - STATE(178), 1, - sym__order_by_clause, - STATE(225), 1, - sym__limit_clause, - ACTIONS(308), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5837] = 3, - ACTIONS(301), 1, - anon_sym_COMMA, - STATE(144), 1, - aux_sym__select_elements_repeat1, - ACTIONS(310), 13, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5859] = 1, - ACTIONS(303), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5876] = 4, - ACTIONS(312), 1, - anon_sym_INT, - STATE(188), 1, - sym_data_type, - ACTIONS(316), 2, - anon_sym_VARCHAR, - anon_sym_CHAR, - ACTIONS(314), 10, - anon_sym_INTEGER, - anon_sym_BIGINT, - anon_sym_SMALLINT, - anon_sym_TEXT, - anon_sym_DATE, - anon_sym_TIMESTAMP, - anon_sym_BOOLEAN, - anon_sym_FLOAT, - anon_sym_DOUBLE, - anon_sym_DECIMAL, - [5899] = 3, - ACTIONS(318), 1, - anon_sym_COMMA, - STATE(150), 1, - aux_sym__from_clause_repeat1, - ACTIONS(249), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5920] = 3, - ACTIONS(205), 1, - anon_sym_COMMA, - STATE(150), 1, - aux_sym__from_clause_repeat1, - ACTIONS(321), 12, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5941] = 1, - ACTIONS(323), 14, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_FROM, - anon_sym_WHERE, - anon_sym_GROUP, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5958] = 7, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(165), 1, - sym__having_clause, - STATE(179), 1, - sym__order_by_clause, - STATE(227), 1, - sym__limit_clause, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [5986] = 7, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(163), 1, - sym__having_clause, - STATE(178), 1, - sym__order_by_clause, - STATE(225), 1, - sym__limit_clause, - ACTIONS(308), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6014] = 7, - ACTIONS(263), 1, - anon_sym_HAVING, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(162), 1, - sym__having_clause, - STATE(185), 1, - sym__order_by_clause, - STATE(211), 1, - sym__limit_clause, - ACTIONS(325), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6042] = 8, - ACTIONS(327), 1, - ts_builtin_sym_end, - ACTIONS(329), 1, - anon_sym_SELECT, - ACTIONS(332), 1, - anon_sym_INSERT, - ACTIONS(335), 1, - anon_sym_UPDATE, - ACTIONS(338), 1, - anon_sym_DELETE, - ACTIONS(341), 1, - anon_sym_CREATE, - STATE(156), 2, - sym__statement, - aux_sym_source_file_repeat1, - STATE(213), 5, - sym_select_statement, - sym_insert_statement, - sym_update_statement, - sym_delete_statement, - sym_create_table_statement, - [6072] = 8, - ACTIONS(5), 1, - anon_sym_SELECT, - ACTIONS(7), 1, - anon_sym_INSERT, - ACTIONS(9), 1, - anon_sym_UPDATE, - ACTIONS(11), 1, - anon_sym_DELETE, - ACTIONS(13), 1, - anon_sym_CREATE, - ACTIONS(344), 1, - ts_builtin_sym_end, - STATE(156), 2, - sym__statement, - aux_sym_source_file_repeat1, - STATE(213), 5, - sym_select_statement, - sym_insert_statement, - sym_update_statement, - sym_delete_statement, - sym_create_table_statement, - [6102] = 3, - ACTIONS(135), 1, - anon_sym_COMMA, - STATE(159), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(346), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6121] = 3, - ACTIONS(348), 1, - anon_sym_COMMA, - STATE(159), 1, - aux_sym__group_by_clause_repeat1, - ACTIONS(145), 10, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_HAVING, - anon_sym_ORDER, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6140] = 5, - ACTIONS(353), 1, - anon_sym_COMMA, - ACTIONS(355), 1, - anon_sym_WHERE, - STATE(168), 1, - aux_sym_update_statement_repeat1, - STATE(214), 1, - sym__where_clause, - ACTIONS(351), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6162] = 5, - ACTIONS(353), 1, - anon_sym_COMMA, - ACTIONS(355), 1, - anon_sym_WHERE, - STATE(160), 1, - aux_sym_update_statement_repeat1, - STATE(228), 1, - sym__where_clause, - ACTIONS(357), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6184] = 5, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(190), 1, - sym__order_by_clause, - STATE(221), 1, - sym__limit_clause, - ACTIONS(359), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6206] = 5, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(185), 1, - sym__order_by_clause, - STATE(211), 1, - sym__limit_clause, - ACTIONS(325), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6228] = 5, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(179), 1, - sym__order_by_clause, - STATE(227), 1, - sym__limit_clause, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6250] = 5, - ACTIONS(265), 1, - anon_sym_ORDER, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(178), 1, - sym__order_by_clause, - STATE(225), 1, - sym__limit_clause, - ACTIONS(308), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6272] = 3, - ACTIONS(363), 1, - anon_sym_COMMA, - STATE(169), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(361), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6289] = 3, - ACTIONS(363), 1, - anon_sym_COMMA, - STATE(166), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(365), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6306] = 3, - ACTIONS(369), 1, - anon_sym_COMMA, - STATE(168), 1, - aux_sym_update_statement_repeat1, - ACTIONS(367), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_WHERE, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6323] = 3, - ACTIONS(374), 1, - anon_sym_COMMA, - STATE(169), 1, - aux_sym__order_by_clause_repeat1, - ACTIONS(372), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6340] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(194), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(377), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6356] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(172), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(381), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6372] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(383), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6388] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(174), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(383), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6404] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(385), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6420] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(176), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(385), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6436] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(387), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6452] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(377), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6468] = 3, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(211), 1, - sym__limit_clause, - ACTIONS(325), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6484] = 3, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(225), 1, - sym__limit_clause, - ACTIONS(308), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6500] = 5, - ACTIONS(394), 1, - anon_sym_DEFAULT, - ACTIONS(397), 1, - anon_sym_REFERENCES, - ACTIONS(389), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(180), 2, - sym_column_constraint, - aux_sym_column_definition_repeat1, - ACTIONS(391), 3, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - [6520] = 4, - ACTIONS(117), 1, - sym_alias_token, - ACTIONS(131), 1, - sym_identifier, - STATE(127), 1, - sym_alias_suffix, - ACTIONS(215), 6, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [6538] = 3, - ACTIONS(355), 1, - anon_sym_WHERE, - STATE(206), 1, - sym__where_clause, - ACTIONS(400), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6554] = 3, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(227), 1, - sym__limit_clause, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6570] = 1, - ACTIONS(402), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6582] = 3, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(221), 1, - sym__limit_clause, - ACTIONS(359), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6598] = 2, - ACTIONS(404), 1, - anon_sym_DOT, - ACTIONS(219), 8, - sym_alias_token, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - sym_identifier, - [6612] = 1, - ACTIONS(367), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_WHERE, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6624] = 5, - ACTIONS(410), 1, - anon_sym_DEFAULT, - ACTIONS(412), 1, - anon_sym_REFERENCES, - ACTIONS(406), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(193), 2, - sym_column_constraint, - aux_sym_column_definition_repeat1, - ACTIONS(408), 3, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - [6644] = 1, - ACTIONS(372), 9, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_LIMIT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6656] = 3, - ACTIONS(267), 1, - anon_sym_LIMIT, - STATE(229), 1, - sym__limit_clause, - ACTIONS(414), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6672] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(177), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(416), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6688] = 3, - ACTIONS(420), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(418), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6704] = 5, - ACTIONS(410), 1, - anon_sym_DEFAULT, - ACTIONS(412), 1, - anon_sym_REFERENCES, - ACTIONS(423), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - STATE(180), 2, - sym_column_constraint, - aux_sym_column_definition_repeat1, - ACTIONS(408), 3, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - [6724] = 3, - ACTIONS(379), 1, - anon_sym_COMMA, - STATE(192), 1, - aux_sym_insert_statement_repeat2, - ACTIONS(425), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6740] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(433), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6761] = 1, - ACTIONS(435), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6772] = 1, - ACTIONS(247), 8, - sym_alias_token, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - sym_identifier, - [6783] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(437), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6804] = 1, - ACTIONS(439), 8, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_COMMA, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6815] = 2, - ACTIONS(443), 1, - anon_sym_LPAREN, - ACTIONS(441), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [6828] = 2, - ACTIONS(445), 1, - anon_sym_LPAREN, - ACTIONS(171), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [6841] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(447), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6862] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(449), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6883] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(451), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6904] = 6, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - ACTIONS(453), 1, - anon_sym_ON, - STATE(128), 1, - sym_join_list, - STATE(209), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [6925] = 1, - ACTIONS(455), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6935] = 1, - ACTIONS(385), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6945] = 1, - ACTIONS(457), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [6955] = 2, - ACTIONS(459), 1, - anon_sym_COMMA, - ACTIONS(285), 6, - anon_sym_JOIN, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_INNER, - anon_sym_FULL, - anon_sym_ON, - [6967] = 1, - ACTIONS(441), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [6977] = 1, - ACTIONS(359), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6987] = 1, - ACTIONS(291), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [6997] = 2, - ACTIONS(463), 1, - anon_sym_SEMI, - ACTIONS(461), 6, - ts_builtin_sym_end, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7009] = 1, - ACTIONS(465), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7019] = 1, - ACTIONS(467), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7029] = 1, - ACTIONS(469), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7039] = 1, - ACTIONS(377), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7049] = 1, - ACTIONS(471), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7059] = 1, - ACTIONS(383), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7069] = 1, - ACTIONS(473), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [7079] = 1, - ACTIONS(414), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7089] = 1, - ACTIONS(416), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7099] = 1, - ACTIONS(381), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7109] = 1, - ACTIONS(475), 7, - anon_sym_COMMA, - anon_sym_RPAREN, - anon_sym_PRIMARYKEY, - anon_sym_NOTNULL, - anon_sym_UNIQUE, - anon_sym_DEFAULT, - anon_sym_REFERENCES, - [7119] = 1, - ACTIONS(325), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7129] = 1, - ACTIONS(477), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7139] = 1, - ACTIONS(308), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7149] = 1, - ACTIONS(351), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7159] = 1, - ACTIONS(479), 7, - ts_builtin_sym_end, - anon_sym_SEMI, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7169] = 4, - ACTIONS(427), 1, - anon_sym_JOIN, - ACTIONS(431), 1, - anon_sym_INNER, - STATE(125), 1, - sym_join_table, - ACTIONS(429), 3, - anon_sym_LEFT, - anon_sym_RIGHT, - anon_sym_FULL, - [7184] = 1, - ACTIONS(481), 6, - ts_builtin_sym_end, - anon_sym_SELECT, - anon_sym_INSERT, - anon_sym_UPDATE, - anon_sym_DELETE, - anon_sym_CREATE, - [7193] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(195), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7205] = 3, - ACTIONS(485), 1, - sym_identifier, - STATE(79), 1, - sym_table_name, - STATE(78), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7217] = 3, - ACTIONS(485), 1, - sym_identifier, - STATE(79), 1, - sym_table_name, - STATE(100), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7229] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(205), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7241] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(204), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7253] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(202), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7265] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(198), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7277] = 3, - ACTIONS(483), 1, - sym_identifier, - STATE(181), 1, - sym_table_name, - STATE(203), 3, - sym__table_reference, - sym_table_alias, - sym_join_clause, - [7289] = 4, - ACTIONS(5), 1, - anon_sym_SELECT, - ACTIONS(487), 1, - anon_sym_LPAREN, - ACTIONS(489), 1, - anon_sym_VALUES, - STATE(217), 1, - sym_select_statement, - [7302] = 4, - ACTIONS(5), 1, - anon_sym_SELECT, - ACTIONS(491), 1, - anon_sym_LPAREN, - ACTIONS(493), 1, - anon_sym_VALUES, - STATE(218), 1, - sym_select_statement, - [7315] = 4, - ACTIONS(5), 1, - anon_sym_SELECT, - ACTIONS(495), 1, - anon_sym_LPAREN, - ACTIONS(497), 1, - anon_sym_VALUES, - STATE(222), 1, - sym_select_statement, - [7328] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(501), 1, - anon_sym_RPAREN, - STATE(252), 1, - aux_sym_insert_statement_repeat1, - [7338] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(503), 1, - anon_sym_RPAREN, - STATE(247), 1, - aux_sym_insert_statement_repeat1, - [7348] = 3, - ACTIONS(505), 1, - anon_sym_COMMA, - ACTIONS(507), 1, - anon_sym_RPAREN, - STATE(257), 1, - aux_sym_create_table_statement_repeat1, - [7358] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(509), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7368] = 3, - ACTIONS(511), 1, - anon_sym_COMMA, - ACTIONS(514), 1, - anon_sym_RPAREN, - STATE(247), 1, - aux_sym_insert_statement_repeat1, - [7378] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(516), 1, - anon_sym_RPAREN, - STATE(259), 1, - aux_sym_insert_statement_repeat1, - [7388] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(518), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7398] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(520), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7408] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(289), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7418] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(516), 1, - anon_sym_RPAREN, - STATE(247), 1, - aux_sym_insert_statement_repeat1, - [7428] = 3, - ACTIONS(522), 1, - anon_sym_COMMA, - ACTIONS(525), 1, - anon_sym_RPAREN, - STATE(253), 1, - aux_sym_create_table_statement_repeat1, - [7438] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(527), 1, - anon_sym_RPAREN, - STATE(244), 1, - aux_sym_insert_statement_repeat1, - [7448] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(529), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7458] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(531), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7468] = 3, - ACTIONS(505), 1, - anon_sym_COMMA, - ACTIONS(533), 1, - anon_sym_RPAREN, - STATE(253), 1, - aux_sym_create_table_statement_repeat1, - [7478] = 3, - ACTIONS(145), 1, - anon_sym_RPAREN, - ACTIONS(535), 1, - anon_sym_COMMA, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7488] = 3, - ACTIONS(499), 1, - anon_sym_COMMA, - ACTIONS(538), 1, - anon_sym_RPAREN, - STATE(247), 1, - aux_sym_insert_statement_repeat1, - [7498] = 3, - ACTIONS(273), 1, - anon_sym_COMMA, - ACTIONS(540), 1, - anon_sym_RPAREN, - STATE(258), 1, - aux_sym__group_by_clause_repeat1, - [7508] = 2, - ACTIONS(542), 1, - sym_identifier, - STATE(187), 1, - sym_update_assignment, - [7515] = 2, - ACTIONS(5), 1, - anon_sym_SELECT, - STATE(219), 1, - sym_select_statement, - [7522] = 1, - ACTIONS(525), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [7527] = 2, - ACTIONS(544), 1, - sym_identifier, - STATE(313), 1, - sym_table_name, - [7534] = 2, - ACTIONS(546), 1, - anon_sym_JOIN, - ACTIONS(548), 1, - anon_sym_OUTER, - [7541] = 2, - ACTIONS(550), 1, - anon_sym_NULL, - ACTIONS(552), 1, - anon_sym_NOT, - [7548] = 2, - ACTIONS(554), 1, - anon_sym_NULL, - ACTIONS(556), 1, - anon_sym_NOT, - [7555] = 1, - ACTIONS(514), 2, - anon_sym_COMMA, - anon_sym_RPAREN, - [7560] = 2, - ACTIONS(558), 1, - sym_identifier, - STATE(245), 1, - sym_column_definition, - [7567] = 2, - ACTIONS(5), 1, - anon_sym_SELECT, - STATE(207), 1, - sym_select_statement, - [7574] = 2, - ACTIONS(558), 1, - sym_identifier, - STATE(263), 1, - sym_column_definition, - [7581] = 2, - ACTIONS(5), 1, - anon_sym_SELECT, - STATE(223), 1, - sym_select_statement, - [7588] = 2, - ACTIONS(542), 1, - sym_identifier, - STATE(161), 1, - sym_update_assignment, - [7595] = 2, - ACTIONS(560), 1, - anon_sym_NULL, - ACTIONS(562), 1, - anon_sym_NOT, - [7602] = 2, - ACTIONS(544), 1, - sym_identifier, - STATE(182), 1, - sym_table_name, - [7609] = 2, - ACTIONS(544), 1, - sym_identifier, - STATE(241), 1, - sym_table_name, - [7616] = 2, - ACTIONS(544), 1, - sym_identifier, - STATE(201), 1, - sym_table_name, - [7623] = 2, - ACTIONS(544), 1, - sym_identifier, - STATE(311), 1, - sym_table_name, - [7630] = 2, - ACTIONS(564), 1, - anon_sym_JOIN, - ACTIONS(566), 1, - anon_sym_OUTER, - [7637] = 1, - ACTIONS(568), 1, - aux_sym_string_token1, - [7641] = 1, - ACTIONS(570), 1, - sym_number, - [7645] = 1, - ACTIONS(572), 1, - sym_identifier, - [7649] = 1, - ACTIONS(574), 1, - anon_sym_LPAREN, - [7653] = 1, - ACTIONS(576), 1, - aux_sym_string_token2, - [7657] = 1, - ACTIONS(578), 1, - anon_sym_LPAREN, - [7661] = 1, - ACTIONS(580), 1, - anon_sym_SQUOTE, - [7665] = 1, - ACTIONS(580), 1, - anon_sym_DQUOTE, - [7669] = 1, - ACTIONS(582), 1, - anon_sym_NULL, - [7673] = 1, - ACTIONS(584), 1, - sym_identifier, - [7677] = 1, - ACTIONS(586), 1, - sym_identifier, - [7681] = 1, - ACTIONS(588), 1, - anon_sym_RPAREN, - [7685] = 1, - ACTIONS(590), 1, - sym_identifier, - [7689] = 1, - ACTIONS(281), 1, - anon_sym_RPAREN, - [7693] = 1, - ACTIONS(592), 1, - anon_sym_LPAREN, - [7697] = 1, - ACTIONS(594), 1, - anon_sym_NULL, - [7701] = 1, - ACTIONS(596), 1, - anon_sym_FROM, - [7705] = 1, - ACTIONS(598), 1, - anon_sym_TABLE, - [7709] = 1, - ACTIONS(600), 1, - sym_identifier, - [7713] = 1, - ACTIONS(602), 1, - anon_sym_LPAREN, - [7717] = 1, - ACTIONS(604), 1, - anon_sym_EQ, - [7721] = 1, - ACTIONS(606), 1, - sym_identifier, - [7725] = 1, - ACTIONS(608), 1, - anon_sym_SQUOTE, - [7729] = 1, - ACTIONS(610), 1, - sym_identifier, - [7733] = 1, - ACTIONS(612), 1, - anon_sym_JOIN, - [7737] = 1, - ACTIONS(614), 1, - anon_sym_DQUOTE, - [7741] = 1, - ACTIONS(608), 1, - anon_sym_DQUOTE, - [7745] = 1, - ACTIONS(616), 1, - sym_identifier, - [7749] = 1, - ACTIONS(618), 1, - sym_number, - [7753] = 1, - ACTIONS(620), 1, - sym_identifier, - [7757] = 1, - ACTIONS(283), 1, - anon_sym_RPAREN, - [7761] = 1, - ACTIONS(622), 1, - anon_sym_SET, - [7765] = 1, - ACTIONS(624), 1, - anon_sym_NULL, - [7769] = 1, - ACTIONS(626), 1, - anon_sym_LPAREN, - [7773] = 1, - ACTIONS(628), 1, - sym_identifier, - [7777] = 1, - ACTIONS(630), 1, - aux_sym_string_token1, - [7781] = 1, - ACTIONS(632), 1, - aux_sym_string_token2, - [7785] = 1, - ACTIONS(634), 1, - sym_identifier, - [7789] = 1, - ACTIONS(636), 1, - ts_builtin_sym_end, - [7793] = 1, - ACTIONS(279), 1, - anon_sym_RPAREN, - [7797] = 1, - ACTIONS(638), 1, - anon_sym_INTO, - [7801] = 1, - ACTIONS(546), 1, - anon_sym_JOIN, - [7805] = 1, - ACTIONS(640), 1, - aux_sym_string_token2, - [7809] = 1, - ACTIONS(642), 1, - sym_identifier, - [7813] = 1, - ACTIONS(644), 1, - anon_sym_BY, - [7817] = 1, - ACTIONS(646), 1, - aux_sym_string_token1, - [7821] = 1, - ACTIONS(648), 1, - anon_sym_BY, - [7825] = 1, - ACTIONS(650), 1, - anon_sym_RPAREN, - [7829] = 1, - ACTIONS(564), 1, - anon_sym_JOIN, - [7833] = 1, - ACTIONS(652), 1, - anon_sym_JOIN, - [7837] = 1, - ACTIONS(614), 1, - anon_sym_SQUOTE, -}; - -static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 50, - [SMALL_STATE(4)] = 94, - [SMALL_STATE(5)] = 138, - [SMALL_STATE(6)] = 182, - [SMALL_STATE(7)] = 226, - [SMALL_STATE(8)] = 270, - [SMALL_STATE(9)] = 314, - [SMALL_STATE(10)] = 358, - [SMALL_STATE(11)] = 402, - [SMALL_STATE(12)] = 446, - [SMALL_STATE(13)] = 494, - [SMALL_STATE(14)] = 548, - [SMALL_STATE(15)] = 600, - [SMALL_STATE(16)] = 646, - [SMALL_STATE(17)] = 690, - [SMALL_STATE(18)] = 734, - [SMALL_STATE(19)] = 778, - [SMALL_STATE(20)] = 822, - [SMALL_STATE(21)] = 866, - [SMALL_STATE(22)] = 906, - [SMALL_STATE(23)] = 944, - [SMALL_STATE(24)] = 994, - [SMALL_STATE(25)] = 1044, - [SMALL_STATE(26)] = 1094, - [SMALL_STATE(27)] = 1136, - [SMALL_STATE(28)] = 1174, - [SMALL_STATE(29)] = 1212, - [SMALL_STATE(30)] = 1250, - [SMALL_STATE(31)] = 1288, - [SMALL_STATE(32)] = 1326, - [SMALL_STATE(33)] = 1364, - [SMALL_STATE(34)] = 1402, - [SMALL_STATE(35)] = 1440, - [SMALL_STATE(36)] = 1478, - [SMALL_STATE(37)] = 1520, - [SMALL_STATE(38)] = 1570, - [SMALL_STATE(39)] = 1618, - [SMALL_STATE(40)] = 1656, - [SMALL_STATE(41)] = 1694, - [SMALL_STATE(42)] = 1732, - [SMALL_STATE(43)] = 1789, - [SMALL_STATE(44)] = 1825, - [SMALL_STATE(45)] = 1861, - [SMALL_STATE(46)] = 1897, - [SMALL_STATE(47)] = 1933, - [SMALL_STATE(48)] = 1969, - [SMALL_STATE(49)] = 2005, - [SMALL_STATE(50)] = 2041, - [SMALL_STATE(51)] = 2077, - [SMALL_STATE(52)] = 2113, - [SMALL_STATE(53)] = 2153, - [SMALL_STATE(54)] = 2191, - [SMALL_STATE(55)] = 2227, - [SMALL_STATE(56)] = 2263, - [SMALL_STATE(57)] = 2299, - [SMALL_STATE(58)] = 2345, - [SMALL_STATE(59)] = 2381, - [SMALL_STATE(60)] = 2429, - [SMALL_STATE(61)] = 2477, - [SMALL_STATE(62)] = 2522, - [SMALL_STATE(63)] = 2565, - [SMALL_STATE(64)] = 2608, - [SMALL_STATE(65)] = 2649, - [SMALL_STATE(66)] = 2690, - [SMALL_STATE(67)] = 2742, - [SMALL_STATE(68)] = 2781, - [SMALL_STATE(69)] = 2820, - [SMALL_STATE(70)] = 2859, - [SMALL_STATE(71)] = 2898, - [SMALL_STATE(72)] = 2947, - [SMALL_STATE(73)] = 2986, - [SMALL_STATE(74)] = 3035, - [SMALL_STATE(75)] = 3084, - [SMALL_STATE(76)] = 3130, - [SMALL_STATE(77)] = 3176, - [SMALL_STATE(78)] = 3222, - [SMALL_STATE(79)] = 3260, - [SMALL_STATE(80)] = 3292, - [SMALL_STATE(81)] = 3320, - [SMALL_STATE(82)] = 3363, - [SMALL_STATE(83)] = 3406, - [SMALL_STATE(84)] = 3449, - [SMALL_STATE(85)] = 3472, - [SMALL_STATE(86)] = 3515, - [SMALL_STATE(87)] = 3558, - [SMALL_STATE(88)] = 3601, - [SMALL_STATE(89)] = 3644, - [SMALL_STATE(90)] = 3687, - [SMALL_STATE(91)] = 3730, - [SMALL_STATE(92)] = 3773, - [SMALL_STATE(93)] = 3816, - [SMALL_STATE(94)] = 3859, - [SMALL_STATE(95)] = 3882, - [SMALL_STATE(96)] = 3925, - [SMALL_STATE(97)] = 3950, - [SMALL_STATE(98)] = 3993, - [SMALL_STATE(99)] = 4036, - [SMALL_STATE(100)] = 4079, - [SMALL_STATE(101)] = 4112, - [SMALL_STATE(102)] = 4155, - [SMALL_STATE(103)] = 4198, - [SMALL_STATE(104)] = 4241, - [SMALL_STATE(105)] = 4284, - [SMALL_STATE(106)] = 4327, - [SMALL_STATE(107)] = 4370, - [SMALL_STATE(108)] = 4413, - [SMALL_STATE(109)] = 4456, - [SMALL_STATE(110)] = 4499, - [SMALL_STATE(111)] = 4542, - [SMALL_STATE(112)] = 4585, - [SMALL_STATE(113)] = 4628, - [SMALL_STATE(114)] = 4671, - [SMALL_STATE(115)] = 4714, - [SMALL_STATE(116)] = 4757, - [SMALL_STATE(117)] = 4800, - [SMALL_STATE(118)] = 4843, - [SMALL_STATE(119)] = 4886, - [SMALL_STATE(120)] = 4929, - [SMALL_STATE(121)] = 4972, - [SMALL_STATE(122)] = 5015, - [SMALL_STATE(123)] = 5058, - [SMALL_STATE(124)] = 5101, - [SMALL_STATE(125)] = 5125, - [SMALL_STATE(126)] = 5147, - [SMALL_STATE(127)] = 5193, - [SMALL_STATE(128)] = 5215, - [SMALL_STATE(129)] = 5237, - [SMALL_STATE(130)] = 5276, - [SMALL_STATE(131)] = 5297, - [SMALL_STATE(132)] = 5336, - [SMALL_STATE(133)] = 5375, - [SMALL_STATE(134)] = 5414, - [SMALL_STATE(135)] = 5453, - [SMALL_STATE(136)] = 5474, - [SMALL_STATE(137)] = 5513, - [SMALL_STATE(138)] = 5552, - [SMALL_STATE(139)] = 5586, - [SMALL_STATE(140)] = 5626, - [SMALL_STATE(141)] = 5659, - [SMALL_STATE(142)] = 5692, - [SMALL_STATE(143)] = 5725, - [SMALL_STATE(144)] = 5747, - [SMALL_STATE(145)] = 5769, - [SMALL_STATE(146)] = 5803, - [SMALL_STATE(147)] = 5837, - [SMALL_STATE(148)] = 5859, - [SMALL_STATE(149)] = 5876, - [SMALL_STATE(150)] = 5899, - [SMALL_STATE(151)] = 5920, - [SMALL_STATE(152)] = 5941, - [SMALL_STATE(153)] = 5958, - [SMALL_STATE(154)] = 5986, - [SMALL_STATE(155)] = 6014, - [SMALL_STATE(156)] = 6042, - [SMALL_STATE(157)] = 6072, - [SMALL_STATE(158)] = 6102, - [SMALL_STATE(159)] = 6121, - [SMALL_STATE(160)] = 6140, - [SMALL_STATE(161)] = 6162, - [SMALL_STATE(162)] = 6184, - [SMALL_STATE(163)] = 6206, - [SMALL_STATE(164)] = 6228, - [SMALL_STATE(165)] = 6250, - [SMALL_STATE(166)] = 6272, - [SMALL_STATE(167)] = 6289, - [SMALL_STATE(168)] = 6306, - [SMALL_STATE(169)] = 6323, - [SMALL_STATE(170)] = 6340, - [SMALL_STATE(171)] = 6356, - [SMALL_STATE(172)] = 6372, - [SMALL_STATE(173)] = 6388, - [SMALL_STATE(174)] = 6404, - [SMALL_STATE(175)] = 6420, - [SMALL_STATE(176)] = 6436, - [SMALL_STATE(177)] = 6452, - [SMALL_STATE(178)] = 6468, - [SMALL_STATE(179)] = 6484, - [SMALL_STATE(180)] = 6500, - [SMALL_STATE(181)] = 6520, - [SMALL_STATE(182)] = 6538, - [SMALL_STATE(183)] = 6554, - [SMALL_STATE(184)] = 6570, - [SMALL_STATE(185)] = 6582, - [SMALL_STATE(186)] = 6598, - [SMALL_STATE(187)] = 6612, - [SMALL_STATE(188)] = 6624, - [SMALL_STATE(189)] = 6644, - [SMALL_STATE(190)] = 6656, - [SMALL_STATE(191)] = 6672, - [SMALL_STATE(192)] = 6688, - [SMALL_STATE(193)] = 6704, - [SMALL_STATE(194)] = 6724, - [SMALL_STATE(195)] = 6740, - [SMALL_STATE(196)] = 6761, - [SMALL_STATE(197)] = 6772, - [SMALL_STATE(198)] = 6783, - [SMALL_STATE(199)] = 6804, - [SMALL_STATE(200)] = 6815, - [SMALL_STATE(201)] = 6828, - [SMALL_STATE(202)] = 6841, - [SMALL_STATE(203)] = 6862, - [SMALL_STATE(204)] = 6883, - [SMALL_STATE(205)] = 6904, - [SMALL_STATE(206)] = 6925, - [SMALL_STATE(207)] = 6935, - [SMALL_STATE(208)] = 6945, - [SMALL_STATE(209)] = 6955, - [SMALL_STATE(210)] = 6967, - [SMALL_STATE(211)] = 6977, - [SMALL_STATE(212)] = 6987, - [SMALL_STATE(213)] = 6997, - [SMALL_STATE(214)] = 7009, - [SMALL_STATE(215)] = 7019, - [SMALL_STATE(216)] = 7029, - [SMALL_STATE(217)] = 7039, - [SMALL_STATE(218)] = 7049, - [SMALL_STATE(219)] = 7059, - [SMALL_STATE(220)] = 7069, - [SMALL_STATE(221)] = 7079, - [SMALL_STATE(222)] = 7089, - [SMALL_STATE(223)] = 7099, - [SMALL_STATE(224)] = 7109, - [SMALL_STATE(225)] = 7119, - [SMALL_STATE(226)] = 7129, - [SMALL_STATE(227)] = 7139, - [SMALL_STATE(228)] = 7149, - [SMALL_STATE(229)] = 7159, - [SMALL_STATE(230)] = 7169, - [SMALL_STATE(231)] = 7184, - [SMALL_STATE(232)] = 7193, - [SMALL_STATE(233)] = 7205, - [SMALL_STATE(234)] = 7217, - [SMALL_STATE(235)] = 7229, - [SMALL_STATE(236)] = 7241, - [SMALL_STATE(237)] = 7253, - [SMALL_STATE(238)] = 7265, - [SMALL_STATE(239)] = 7277, - [SMALL_STATE(240)] = 7289, - [SMALL_STATE(241)] = 7302, - [SMALL_STATE(242)] = 7315, - [SMALL_STATE(243)] = 7328, - [SMALL_STATE(244)] = 7338, - [SMALL_STATE(245)] = 7348, - [SMALL_STATE(246)] = 7358, - [SMALL_STATE(247)] = 7368, - [SMALL_STATE(248)] = 7378, - [SMALL_STATE(249)] = 7388, - [SMALL_STATE(250)] = 7398, - [SMALL_STATE(251)] = 7408, - [SMALL_STATE(252)] = 7418, - [SMALL_STATE(253)] = 7428, - [SMALL_STATE(254)] = 7438, - [SMALL_STATE(255)] = 7448, - [SMALL_STATE(256)] = 7458, - [SMALL_STATE(257)] = 7468, - [SMALL_STATE(258)] = 7478, - [SMALL_STATE(259)] = 7488, - [SMALL_STATE(260)] = 7498, - [SMALL_STATE(261)] = 7508, - [SMALL_STATE(262)] = 7515, - [SMALL_STATE(263)] = 7522, - [SMALL_STATE(264)] = 7527, - [SMALL_STATE(265)] = 7534, - [SMALL_STATE(266)] = 7541, - [SMALL_STATE(267)] = 7548, - [SMALL_STATE(268)] = 7555, - [SMALL_STATE(269)] = 7560, - [SMALL_STATE(270)] = 7567, - [SMALL_STATE(271)] = 7574, - [SMALL_STATE(272)] = 7581, - [SMALL_STATE(273)] = 7588, - [SMALL_STATE(274)] = 7595, - [SMALL_STATE(275)] = 7602, - [SMALL_STATE(276)] = 7609, - [SMALL_STATE(277)] = 7616, - [SMALL_STATE(278)] = 7623, - [SMALL_STATE(279)] = 7630, - [SMALL_STATE(280)] = 7637, - [SMALL_STATE(281)] = 7641, - [SMALL_STATE(282)] = 7645, - [SMALL_STATE(283)] = 7649, - [SMALL_STATE(284)] = 7653, - [SMALL_STATE(285)] = 7657, - [SMALL_STATE(286)] = 7661, - [SMALL_STATE(287)] = 7665, - [SMALL_STATE(288)] = 7669, - [SMALL_STATE(289)] = 7673, - [SMALL_STATE(290)] = 7677, - [SMALL_STATE(291)] = 7681, - [SMALL_STATE(292)] = 7685, - [SMALL_STATE(293)] = 7689, - [SMALL_STATE(294)] = 7693, - [SMALL_STATE(295)] = 7697, - [SMALL_STATE(296)] = 7701, - [SMALL_STATE(297)] = 7705, - [SMALL_STATE(298)] = 7709, - [SMALL_STATE(299)] = 7713, - [SMALL_STATE(300)] = 7717, - [SMALL_STATE(301)] = 7721, - [SMALL_STATE(302)] = 7725, - [SMALL_STATE(303)] = 7729, - [SMALL_STATE(304)] = 7733, - [SMALL_STATE(305)] = 7737, - [SMALL_STATE(306)] = 7741, - [SMALL_STATE(307)] = 7745, - [SMALL_STATE(308)] = 7749, - [SMALL_STATE(309)] = 7753, - [SMALL_STATE(310)] = 7757, - [SMALL_STATE(311)] = 7761, - [SMALL_STATE(312)] = 7765, - [SMALL_STATE(313)] = 7769, - [SMALL_STATE(314)] = 7773, - [SMALL_STATE(315)] = 7777, - [SMALL_STATE(316)] = 7781, - [SMALL_STATE(317)] = 7785, - [SMALL_STATE(318)] = 7789, - [SMALL_STATE(319)] = 7793, - [SMALL_STATE(320)] = 7797, - [SMALL_STATE(321)] = 7801, - [SMALL_STATE(322)] = 7805, - [SMALL_STATE(323)] = 7809, - [SMALL_STATE(324)] = 7813, - [SMALL_STATE(325)] = 7817, - [SMALL_STATE(326)] = 7821, - [SMALL_STATE(327)] = 7825, - [SMALL_STATE(328)] = 7829, - [SMALL_STATE(329)] = 7833, - [SMALL_STATE(330)] = 7837, -}; - -static const TSParseActionEntry ts_parse_actions[] = { - [0] = {.entry = {.count = 0, .reusable = false}}, - [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(320), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(278), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(297), - [15] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 1, 0, 0), - [17] = {.entry = {.count = 1, .reusable = true}}, SHIFT(73), - [19] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 1, 0, 0), - [21] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), - [23] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_literal, 1, 0, 0), - [25] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_literal, 1, 0, 0), - [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_boolean, 1, 0, 0), - [29] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_boolean, 1, 0, 0), - [31] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_null, 1, 0, 0), - [33] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_null, 1, 0, 0), - [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_expression, 2, 0, 0), - [37] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_expression, 2, 0, 0), - [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), - [41] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parenthesized_expression, 3, 0, 0), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_string, 3, 0, 0), - [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_string, 3, 0, 0), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 3, 0, 0), - [49] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 3, 0, 0), - [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_reference, 3, 0, 0), - [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_column_reference, 3, 0, 0), - [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 3, 0, 0), - [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 3, 0, 0), - [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), - [61] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), - [63] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), - [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), - [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [69] = {.entry = {.count = 1, .reusable = true}}, SHIFT(267), - [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, 0, 0), - [73] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, 0, 0), - [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_expression, 4, 0, 0), - [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_expression, 4, 0, 0), - [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 5, 0, 0), - [81] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 5, 0, 0), - [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(307), - [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(102), - [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 4, 0, 0), - [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), - [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), - [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), - [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(266), - [103] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 5, 0, 0), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_table, 6, 0, 0), - [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), - [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(314), - [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 1, 0, 0), - [113] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__select_element, 1, 0, 0), - [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), - [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(323), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(90), - [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), - [123] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), - [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), - [127] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), - [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(274), - [131] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), - [133] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 3, 0, 0), - [135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), - [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 1, 0, 0), - [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(184), - [141] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), - [143] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__where_clause, 2, 0, 0), - [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), - [147] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_assignment, 3, 0, 0), - [149] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__having_clause, 2, 0, 0), - [151] = {.entry = {.count = 1, .reusable = true}}, SHIFT(126), - [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), - [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), - [157] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), - [159] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), - [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), - [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(284), - [165] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), - [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), - [171] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 2, 0, 0), - [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(319), - [175] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), - [177] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), - [179] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), - [181] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), - [183] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), - [185] = {.entry = {.count = 1, .reusable = true}}, SHIFT(315), - [187] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), - [189] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [191] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), - [193] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), - [195] = {.entry = {.count = 1, .reusable = true}}, SHIFT(293), - [197] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), - [199] = {.entry = {.count = 1, .reusable = true}}, SHIFT(310), - [201] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 2, 0, 0), - [205] = {.entry = {.count = 1, .reusable = true}}, SHIFT(234), - [207] = {.entry = {.count = 1, .reusable = true}}, SHIFT(232), - [209] = {.entry = {.count = 1, .reusable = true}}, SHIFT(265), - [211] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), - [213] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_alias, 1, 0, 0), - [215] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_alias, 1, 0, 0), - [217] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 1, 0, 0), - [219] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_name, 1, 0, 0), - [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), - [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(82), - [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), - [227] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [229] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), - [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(280), - [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), - [235] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), - [237] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [239] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), - [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias_suffix, 2, 0, 0), - [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias_suffix, 1, 0, 0), - [245] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_name, 3, 0, 0), - [247] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table_name, 3, 0, 0), - [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), - [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(303), - [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_list, 3, 0, 0), - [255] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 2, 0, 0), - [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(233), - [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(81), - [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(324), - [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), - [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), - [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(281), - [269] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table_alias, 2, 0, 0), - [271] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_clause, 2, 0, 0), - [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), - [275] = {.entry = {.count = 1, .reusable = true}}, SHIFT(199), - [277] = {.entry = {.count = 1, .reusable = true}}, SHIFT(171), - [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(40), - [285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_join_list, 1, 0, 0), - [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), - [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(173), - [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 3, 0, 0), - [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [295] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 1, 0, 0), - [301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), - [303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), - [305] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__select_elements_repeat1, 2, 0, 0), SHIFT_REPEAT(77), - [308] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 4, 0, 0), - [310] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_elements, 2, 0, 0), - [312] = {.entry = {.count = 1, .reusable = false}}, SHIFT(210), - [314] = {.entry = {.count = 1, .reusable = true}}, SHIFT(210), - [316] = {.entry = {.count = 1, .reusable = true}}, SHIFT(200), - [318] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__from_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(234), - [321] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__from_clause, 3, 0, 0), - [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__select_element, 2, 0, 0), - [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 5, 0, 0), - [327] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), - [329] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(66), - [332] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(320), - [335] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(278), - [338] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(296), - [341] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(297), - [344] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), - [346] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__group_by_clause, 4, 0, 0), - [348] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(117), - [351] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 5, 0, 0), - [353] = {.entry = {.count = 1, .reusable = true}}, SHIFT(261), - [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), - [357] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 4, 0, 0), - [359] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 6, 0, 0), - [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 4, 0, 0), - [363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), - [365] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__order_by_clause, 3, 0, 0), - [367] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_update_statement_repeat1, 2, 0, 0), - [369] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_update_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(261), - [372] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), - [374] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__order_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(76), - [377] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 8, 0, 0), - [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(285), - [381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 10, 0, 0), - [383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 11, 0, 0), - [385] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 12, 0, 0), - [387] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 13, 0, 0), - [389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), - [391] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(224), - [394] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(108), - [397] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_column_definition_repeat1, 2, 0, 0), SHIFT_REPEAT(277), - [400] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_delete_statement, 3, 0, 0), - [402] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_order_by_element, 2, 0, 0), - [404] = {.entry = {.count = 1, .reusable = true}}, SHIFT(309), - [406] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_definition, 2, 0, 0), - [408] = {.entry = {.count = 1, .reusable = true}}, SHIFT(224), - [410] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), - [412] = {.entry = {.count = 1, .reusable = true}}, SHIFT(277), - [414] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 7, 0, 0), - [416] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 7, 0, 0), - [418] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 2, 0, 0), - [420] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 2, 0, 0), SHIFT_REPEAT(285), - [423] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_definition, 3, 0, 0), - [425] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 9, 0, 0), - [427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(239), - [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(279), - [431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), - [433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), - [435] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 5, 0, 0), - [437] = {.entry = {.count = 1, .reusable = true}}, SHIFT(112), - [439] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat2, 4, 0, 0), - [441] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_data_type, 1, 0, 0), - [443] = {.entry = {.count = 1, .reusable = true}}, SHIFT(308), - [445] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), - [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), - [449] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), - [451] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), - [453] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), - [455] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_delete_statement, 4, 0, 0), - [457] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 5, 0, 0), - [459] = {.entry = {.count = 1, .reusable = true}}, SHIFT(230), - [461] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 1, 0, 0), - [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(231), - [465] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_update_statement, 6, 0, 0), - [467] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__limit_clause, 2, 0, 0), - [469] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_create_table_statement, 6, 0, 0), - [471] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_insert_statement, 4, 0, 0), - [473] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_data_type, 4, 0, 0), - [475] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_column_constraint, 1, 0, 0), - [477] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_create_table_statement, 7, 0, 0), - [479] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_select_statement, 8, 0, 0), - [481] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__statement, 2, 0, 0), - [483] = {.entry = {.count = 1, .reusable = true}}, SHIFT(186), - [485] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), - [487] = {.entry = {.count = 1, .reusable = true}}, SHIFT(282), - [489] = {.entry = {.count = 1, .reusable = true}}, SHIFT(283), - [491] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), - [493] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), - [495] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), - [497] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), - [499] = {.entry = {.count = 1, .reusable = true}}, SHIFT(301), - [501] = {.entry = {.count = 1, .reusable = true}}, SHIFT(272), - [503] = {.entry = {.count = 1, .reusable = true}}, SHIFT(240), - [505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(271), - [507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(216), - [509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [511] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(301), - [514] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_insert_statement_repeat1, 2, 0, 0), - [516] = {.entry = {.count = 1, .reusable = true}}, SHIFT(262), - [518] = {.entry = {.count = 1, .reusable = true}}, SHIFT(170), - [520] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), - [522] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_create_table_statement_repeat1, 2, 0, 0), SHIFT_REPEAT(271), - [525] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_create_table_statement_repeat1, 2, 0, 0), - [527] = {.entry = {.count = 1, .reusable = true}}, SHIFT(242), - [529] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [531] = {.entry = {.count = 1, .reusable = true}}, SHIFT(175), - [533] = {.entry = {.count = 1, .reusable = true}}, SHIFT(226), - [535] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__group_by_clause_repeat1, 2, 0, 0), SHIFT_REPEAT(95), - [538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(270), - [540] = {.entry = {.count = 1, .reusable = true}}, SHIFT(196), - [542] = {.entry = {.count = 1, .reusable = true}}, SHIFT(300), - [544] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), - [546] = {.entry = {.count = 1, .reusable = true}}, SHIFT(237), - [548] = {.entry = {.count = 1, .reusable = true}}, SHIFT(304), - [550] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [552] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), - [554] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [556] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), - [558] = {.entry = {.count = 1, .reusable = true}}, SHIFT(149), - [560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(54), - [562] = {.entry = {.count = 1, .reusable = true}}, SHIFT(288), - [564] = {.entry = {.count = 1, .reusable = true}}, SHIFT(236), - [566] = {.entry = {.count = 1, .reusable = true}}, SHIFT(329), - [568] = {.entry = {.count = 1, .reusable = true}}, SHIFT(330), - [570] = {.entry = {.count = 1, .reusable = true}}, SHIFT(215), - [572] = {.entry = {.count = 1, .reusable = true}}, SHIFT(248), - [574] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), - [576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), - [578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), - [580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), - [584] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [586] = {.entry = {.count = 1, .reusable = true}}, SHIFT(254), - [588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(220), - [590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(96), - [592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(98), - [594] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [596] = {.entry = {.count = 1, .reusable = true}}, SHIFT(275), - [598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(264), - [600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(243), - [602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), - [604] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), - [606] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268), - [608] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [610] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), - [612] = {.entry = {.count = 1, .reusable = true}}, SHIFT(238), - [614] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [616] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [618] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), - [620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), - [622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(273), - [624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [626] = {.entry = {.count = 1, .reusable = true}}, SHIFT(269), - [628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), - [630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(286), - [632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(287), - [634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(327), - [636] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(276), - [640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(305), - [642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), - [644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(111), - [646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(302), - [648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), - [650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(208), - [652] = {.entry = {.count = 1, .reusable = true}}, SHIFT(235), -}; - -#ifdef __cplusplus -extern "C" { -#endif -#ifdef TREE_SITTER_HIDE_SYMBOLS -#define TS_PUBLIC -#elif defined(_WIN32) -#define TS_PUBLIC __declspec(dllexport) -#else -#define TS_PUBLIC __attribute__((visibility("default"))) -#endif - -TS_PUBLIC const TSLanguage *tree_sitter_base_sql(void) { - static const TSLanguage language = { - .version = LANGUAGE_VERSION, - .symbol_count = SYMBOL_COUNT, - .alias_count = ALIAS_COUNT, - .token_count = TOKEN_COUNT, - .external_token_count = EXTERNAL_TOKEN_COUNT, - .state_count = STATE_COUNT, - .large_state_count = LARGE_STATE_COUNT, - .production_id_count = PRODUCTION_ID_COUNT, - .field_count = FIELD_COUNT, - .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, - .parse_table = &ts_parse_table[0][0], - .small_parse_table = ts_small_parse_table, - .small_parse_table_map = ts_small_parse_table_map, - .parse_actions = ts_parse_actions, - .symbol_names = ts_symbol_names, - .symbol_metadata = ts_symbol_metadata, - .public_symbol_map = ts_symbol_map, - .alias_map = ts_non_terminal_alias_map, - .alias_sequences = &ts_alias_sequences[0][0], - .lex_modes = ts_lex_modes, - .lex_fn = ts_lex, - .primary_state_ids = ts_primary_state_ids, - }; - return &language; -} -#ifdef __cplusplus -} -#endif From 84b671a35f5d08fe8e46e2b0aa01c54bd456c03b Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 19:00:24 -0500 Subject: [PATCH 07/17] Remove Node bindings? --- bindings/node/binding.cc | 20 -------------------- bindings/node/binding_test.js | 9 --------- bindings/node/index.d.ts | 28 ---------------------------- bindings/node/index.js | 11 ----------- 4 files changed, 68 deletions(-) delete mode 100644 bindings/node/binding.cc delete mode 100644 bindings/node/binding_test.js delete mode 100644 bindings/node/index.d.ts delete mode 100644 bindings/node/index.js diff --git a/bindings/node/binding.cc b/bindings/node/binding.cc deleted file mode 100644 index ec564aa..0000000 --- a/bindings/node/binding.cc +++ /dev/null @@ -1,20 +0,0 @@ -#include - -typedef struct TSLanguage TSLanguage; - -extern "C" TSLanguage *tree_sitter_base_sql(); - -// "tree-sitter", "language" hashed with BLAKE2 -const napi_type_tag LANGUAGE_TYPE_TAG = { - 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 -}; - -Napi::Object Init(Napi::Env env, Napi::Object exports) { - exports["name"] = Napi::String::New(env, "base_sql"); - auto language = Napi::External::New(env, tree_sitter_base_sql()); - language.TypeTag(&LANGUAGE_TYPE_TAG); - exports["language"] = language; - return exports; -} - -NODE_API_MODULE(tree_sitter_base_sql_binding, Init) diff --git a/bindings/node/binding_test.js b/bindings/node/binding_test.js deleted file mode 100644 index 55becac..0000000 --- a/bindings/node/binding_test.js +++ /dev/null @@ -1,9 +0,0 @@ -const assert = require("node:assert"); -const { test } = require("node:test"); - -const Parser = require("tree-sitter"); - -test("can load grammar", () => { - const parser = new Parser(); - assert.doesNotThrow(() => parser.setLanguage(require("."))); -}); diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts deleted file mode 100644 index efe259e..0000000 --- a/bindings/node/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -type BaseNode = { - type: string; - named: boolean; -}; - -type ChildNode = { - multiple: boolean; - required: boolean; - types: BaseNode[]; -}; - -type NodeInfo = - | (BaseNode & { - subtypes: BaseNode[]; - }) - | (BaseNode & { - fields: { [name: string]: ChildNode }; - children: ChildNode[]; - }); - -type Language = { - name: string; - language: unknown; - nodeTypeInfo: NodeInfo[]; -}; - -declare const language: Language; -export = language; diff --git a/bindings/node/index.js b/bindings/node/index.js deleted file mode 100644 index 08cd515..0000000 --- a/bindings/node/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const root = require("path").join(__dirname, "..", ".."); - -module.exports = - typeof process.versions.bun === "string" - // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time - ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-base_sql.node`) - : require("node-gyp-build")(root); - -try { - module.exports.nodeTypeInfo = require("../../src/node-types.json"); -} catch (_) {} From c0491b8b75ea222ca71038fce4bf3d5048704b6d Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Tue, 12 Nov 2024 19:12:40 -0500 Subject: [PATCH 08/17] Move grammar file. --- .gitignore | 3 ++- grammars/{baseSql.js => base_sql/grammar.js} | 0 package.json | 3 ++- tree-sitter.json | 6 +----- 4 files changed, 5 insertions(+), 7 deletions(-) rename grammars/{baseSql.js => base_sql/grammar.js} (100%) diff --git a/.gitignore b/.gitignore index 1fd4956..8fe6e5e 100644 --- a/.gitignore +++ b/.gitignore @@ -139,4 +139,5 @@ out src/tree_sitter/** src/grammar.json src/node-types.json -src/parser.c \ No newline at end of file +src/parser.c +parser.dylib \ No newline at end of file diff --git a/grammars/baseSql.js b/grammars/base_sql/grammar.js similarity index 100% rename from grammars/baseSql.js rename to grammars/base_sql/grammar.js diff --git a/package.json b/package.json index 8573bdc..493c688 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "lint": "eslint .", "preview": "vite preview", "tree-sitter": "tree-sitter", - "tsg": "tree-sitter generate grammars/baseSql.js", + "tsg": "tree-sitter generate grammars/base_sql/grammar.js", + "tsb": "tree-sitter build", "tsp": "tree-sitter parse", "tsp-all": "tree-sitter parse examples/**/*.sql --quiet --stat" }, diff --git a/tree-sitter.json b/tree-sitter.json index 6c1c218..c0c8f85 100644 --- a/tree-sitter.json +++ b/tree-sitter.json @@ -13,15 +13,11 @@ "metadata": { "version": "0.1.0", "license": "MIT", - "description": "Common functionality shared across SQL dialects.", "authors": [ { "name": "Vinesh Kannan and Tamjid Rahman" } - ], - "links": { - "repository": "https://github.com/tree-sitter/tree-sitter-base_sql" - } + ] }, "bindings": { "c": false, From c16bf609387bf1081da3bdd0129cfda5e2631e38 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Wed, 13 Nov 2024 11:20:51 -0500 Subject: [PATCH 09/17] Node gyp nonsense. --- binding.gyp | 20 ++ package.json | 8 +- program.cjs | 12 ++ yarn.lock | 558 ++++++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 591 insertions(+), 7 deletions(-) create mode 100644 binding.gyp create mode 100644 program.cjs diff --git a/binding.gyp b/binding.gyp new file mode 100644 index 0000000..e7dddbd --- /dev/null +++ b/binding.gyp @@ -0,0 +1,20 @@ +{ + "targets": [ + { + "target_name": "parser", + "sources": [ "src/parser.c" ], + "include_dirs": [ + "= 2.1.2 < 3.0.0" + ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" @@ -1173,11 +1375,29 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" @@ -1185,6 +1405,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -1195,6 +1420,20 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + +jackspeak@^3.1.2: + version "3.4.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" + integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -1207,6 +1446,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsesc@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" @@ -1276,6 +1520,11 @@ loose-envify@^1.1.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" +lru-cache@^10.0.1, lru-cache@^10.2.0: + version "10.4.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" + integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -1283,6 +1532,24 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +make-fetch-happen@^13.0.0: + version "13.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" + integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== + dependencies: + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" + http-cache-semantics "^4.1.1" + is-lambda "^1.0.1" + minipass "^7.0.2" + minipass-fetch "^3.0.0" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + proc-log "^4.2.0" + promise-retry "^2.0.1" + ssri "^10.0.0" + merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -1310,6 +1577,75 @@ minimatch@^9.0.4: dependencies: brace-expansion "^2.0.1" +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== + dependencies: + minipass "^7.0.3" + +minipass-fetch@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c" + integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg== + dependencies: + minipass "^7.0.3" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0: + version "3.3.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" + integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== + dependencies: + yallist "^4.0.0" + +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== + +minizlib@^2.1.1, minizlib@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -1325,6 +1661,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +negotiator@^0.6.3: + version "0.6.4" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + node-addon-api@^8.2.1: version "8.2.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-8.2.2.tgz#3658f78d04d260aa95931d3bbc45f22ce433b821" @@ -1335,11 +1676,34 @@ node-gyp-build@^4.8.2: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.3.tgz#9187216d24dbee29e44eb20d2ebf62a296bbea1a" integrity sha512-EMS95CMJzdoSKoIiXo8pxKoL8DYxwIZXYlLmgPb8KUv794abpnLK6ynsCAWNliOjREKruYKdzbh76HHYUHX7nw== +node-gyp@^10.2.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86" + integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^10.3.10" + graceful-fs "^4.2.6" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^4.1.0" + semver "^7.3.5" + tar "^6.2.1" + which "^4.0.0" + node-releases@^2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +nopt@^7.0.0: + version "7.2.1" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" + integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== + dependencies: + abbrev "^2.0.0" + optionator@^0.9.3: version "0.9.4" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" @@ -1366,6 +1730,18 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -1383,6 +1759,14 @@ path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== +path-scurry@^1.11.1: + version "1.11.1" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" + integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + picocolors@^1.0.0, picocolors@^1.1.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" @@ -1407,6 +1791,19 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +proc-log@^4.1.0, proc-log@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" + integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== + +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -1442,6 +1839,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -1481,6 +1883,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +"safer-buffer@>= 2.1.2 < 3.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + scheduler@^0.23.2: version "0.23.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" @@ -1493,7 +1900,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.6.0: +semver@^7.3.5, semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -1510,11 +1917,98 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + +smart-buffer@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" + integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== + +socks-proxy-agent@^8.0.3: + version "8.0.4" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" + integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== + dependencies: + agent-base "^7.1.1" + debug "^4.3.4" + socks "^2.8.3" + +socks@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== +sprintf-js@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" + integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== + +ssri@^10.0.0: + version "10.0.6" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" + integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== + dependencies: + minipass "^7.0.3" + +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -1535,6 +2029,18 @@ table-layout@^4.1.0: array-back "^6.2.2" wordwrapjs "^5.1.0" +tar@^6.1.11, tar@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" + integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^5.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -1606,6 +2112,20 @@ undici-types@~6.19.2: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== + dependencies: + unique-slug "^4.0.0" + +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== + dependencies: + imurmurhash "^0.1.4" + update-browserslist-db@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" @@ -1639,6 +2159,13 @@ which@^2.0.1: dependencies: isexe "^2.0.0" +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== + dependencies: + isexe "^3.1.1" + word-wrap@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" @@ -1649,11 +2176,34 @@ wordwrapjs@^5.1.0: resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-5.1.0.tgz#4c4d20446dcc670b14fa115ef4f8fd9947af2b3a" integrity sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg== +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 6975701faa7c1fb03a52062ff042cd1341aed855 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Wed, 13 Nov 2024 11:38:36 -0500 Subject: [PATCH 10/17] Add Postgres grammar but not able to differentiate. --- grammars/{base_sql => basesql}/grammar.js | 2 +- grammars/postgresql/grammar.js | 35 +++++++++++++++++++++++ package.json | 4 +-- tree-sitter.json | 15 ++++++++-- 4 files changed, 50 insertions(+), 6 deletions(-) rename grammars/{base_sql => basesql}/grammar.js (99%) create mode 100644 grammars/postgresql/grammar.js diff --git a/grammars/base_sql/grammar.js b/grammars/basesql/grammar.js similarity index 99% rename from grammars/base_sql/grammar.js rename to grammars/basesql/grammar.js index 19d1b0b..216ef97 100644 --- a/grammars/base_sql/grammar.js +++ b/grammars/basesql/grammar.js @@ -8,7 +8,7 @@ /// export default grammar({ - name: "base_sql", + name: "basesql", rules: { source_file: ($) => repeat($._statement), diff --git a/grammars/postgresql/grammar.js b/grammars/postgresql/grammar.js new file mode 100644 index 0000000..ae3006f --- /dev/null +++ b/grammars/postgresql/grammar.js @@ -0,0 +1,35 @@ +import baseSql from "../basesql/grammar.js"; + +/** + * This is a tree-sitter grammar for ANSI SQL. + * @file Common functionality shared across SQL dialects. + * @author Vinesh Kannan and Tamjid Rahman + * @license MIT + */ + +/// + +export default grammar(baseSql, { + name: "postgresql", + + rules: { + data_type: ($) => + choice( + "INT", + "INTEGER", + "BIGINT", + "SMALLINT", + "VARCHAR", + "TEXT", + "CHAR", + "DATE", + "TIMESTAMP", + "BOOLEAN", // "BOOL", + "FLOAT", + "DOUBLE", + "DECIMAL", + seq("VARCHAR", "(", $.number, ")"), + seq("CHAR", "(", $.number, ")") + ), + }, +}); diff --git a/package.json b/package.json index 0b9495d..219dfc7 100644 --- a/package.json +++ b/package.json @@ -9,10 +9,10 @@ "lint": "eslint .", "preview": "vite preview", "tree-sitter": "tree-sitter", - "tsg": "tree-sitter generate grammars/base_sql/grammar.js", + "tsg": "tree-sitter generate grammars/basesql/grammar.js && tree-sitter generate grammars/postgresql/grammar.js", "tsb": "tree-sitter build", "tsp": "tree-sitter parse", - "tsp-all": "tree-sitter parse examples/**/*.sql --quiet --stat", + "tspa": "tree-sitter parse examples/**/*.sql --quiet --stat", "node-gyp": "node-gyp" }, "dependencies": { diff --git a/tree-sitter.json b/tree-sitter.json index c0c8f85..0725b46 100644 --- a/tree-sitter.json +++ b/tree-sitter.json @@ -1,13 +1,22 @@ { "grammars": [ { - "name": "base_sql", + "name": "basesql", "camelcase": "BaseSql", - "scope": "source.base_sql", + "scope": "source.basesql", "file-types": [ ".sql" ], - "injection-regex": "^base_sql$" + "injection-regex": "^basesql$" + }, + { + "name": "postgresql", + "camelcase": "PostgreSql", + "scope": "source.postgresql", + "file-types": [ + ".psql" + ], + "injection-regex": "^postgresql$" } ], "metadata": { From df03804706bd0fb0257a5bee7fe30bc1a3d7a9ad Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Wed, 13 Nov 2024 14:30:13 -0500 Subject: [PATCH 11/17] Create AST from parser output, but still imperfect source extract. --- asts/function_call.ast | 47 +++++++++++ asts/function_call.json | 0 asts/select_from.ast | 7 ++ asts/select_from.json | 40 +++++++++ examples/function_call.sql | 18 ++++ examples/select_from.sql | 3 + package.json | 6 +- renderers/basesql/renderer.js | 3 + src/converter/createAst.js | 149 +++++++++++++++++++++++++++++++++ src/converter/plainRenderer.js | 7 ++ src/converter/renderer.ts | 19 +++++ src/scripts/plainRender.js | 15 ++++ src/scripts/render.ts | 19 +++++ yarn.lock | 55 +++++++++++- 14 files changed, 384 insertions(+), 4 deletions(-) create mode 100644 asts/function_call.ast create mode 100644 asts/function_call.json create mode 100644 asts/select_from.ast create mode 100644 asts/select_from.json create mode 100644 examples/function_call.sql create mode 100644 examples/select_from.sql create mode 100644 renderers/basesql/renderer.js create mode 100644 src/converter/createAst.js create mode 100644 src/converter/plainRenderer.js create mode 100644 src/converter/renderer.ts create mode 100644 src/scripts/plainRender.js create mode 100644 src/scripts/render.ts diff --git a/asts/function_call.ast b/asts/function_call.ast new file mode 100644 index 0000000..f57f517 --- /dev/null +++ b/asts/function_call.ast @@ -0,0 +1,47 @@ +(source_file [0, 0] - [17, 1] + (select_statement [0, 0] - [16, 7] + (column_reference [1, 4] - [1, 12] + (identifier [1, 4] - [1, 12])) + (alias_suffix [1, 13] - [1, 17] + (alias_token [1, 13] - [1, 15]) + (identifier [1, 16] - [1, 17])) + (literal [2, 4] - [2, 6] + (number [2, 4] - [2, 6])) + (function_call [3, 4] - [3, 14] + (identifier [3, 4] - [3, 8]) + (column_reference [3, 9] - [3, 10] + (identifier [3, 9] - [3, 10])) + (column_reference [3, 12] - [3, 13] + (identifier [3, 12] - [3, 13]))) + (function_call [4, 4] - [9, 5] + (identifier [4, 4] - [4, 13]) + (column_reference [5, 8] - [5, 9] + (identifier [5, 8] - [5, 9])) + (literal [6, 8] - [6, 9] + (number [6, 8] - [6, 9])) + (column_reference [7, 8] - [7, 9] + (identifier [7, 8] - [7, 9])) + (literal [8, 8] - [8, 9] + (number [8, 8] - [8, 9]))) + (alias_suffix [9, 6] - [9, 13] + (alias_token [9, 6] - [9, 8]) + (identifier [9, 9] - [9, 13])) + (table_alias [10, 5] - [10, 16] + (table_name [10, 5] - [10, 12] + (identifier [10, 5] - [10, 12])) + (alias_suffix [10, 13] - [10, 16] + (identifier [10, 13] - [10, 16]))) + (binary_expression [11, 6] - [15, 1] + (parenthesized_expression [11, 6] - [13, 1] + (binary_expression [12, 4] - [12, 9] + (column_reference [12, 4] - [12, 5] + (identifier [12, 4] - [12, 5])) + (literal [12, 8] - [12, 9] + (number [12, 8] - [12, 9])))) + (parenthesized_expression [13, 5] - [15, 1] + (binary_expression [14, 4] - [14, 9] + (column_reference [14, 4] - [14, 5] + (identifier [14, 4] - [14, 5])) + (literal [14, 8] - [14, 9] + (number [14, 8] - [14, 9]))))) + (number [16, 6] - [16, 7]))) \ No newline at end of file diff --git a/asts/function_call.json b/asts/function_call.json new file mode 100644 index 0000000..e69de29 diff --git a/asts/select_from.ast b/asts/select_from.ast new file mode 100644 index 0000000..dd37337 --- /dev/null +++ b/asts/select_from.ast @@ -0,0 +1,7 @@ +(source_file [0, 0] - [2, 1] + (select_statement [0, 0] - [1, 12] + (column_reference [0, 7] - [0, 8] + (identifier [0, 7] - [0, 8])) + (table_alias [1, 5] - [1, 12] + (table_name [1, 5] - [1, 12] + (identifier [1, 5] - [1, 12]))))) \ No newline at end of file diff --git a/asts/select_from.json b/asts/select_from.json new file mode 100644 index 0000000..933b2c3 --- /dev/null +++ b/asts/select_from.json @@ -0,0 +1,40 @@ +{ + "name": "source_file", + "source": "SELECT a\nFROM table_a\n;", + "children": [ + { + "name": "select_statement", + "source": "SELECT a\nFROM table_a\n;", + "children": [ + { + "name": "column_reference", + "source": "a", + "children": [ + { + "name": "identifier", + "source": "a", + "children": [] + } + ] + }, + { + "name": "table_alias", + "source": "", + "children": [ + { + "name": "table_name", + "source": "", + "children": [ + { + "name": "identifier", + "source": "", + "children": [] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/examples/function_call.sql b/examples/function_call.sql new file mode 100644 index 0000000..73a48c7 --- /dev/null +++ b/examples/function_call.sql @@ -0,0 +1,18 @@ +SELECT + column_a AS a, + 12, + func(a, b), + otherFunc( + a, + 1, + b, + 2 + ) AS yeah +FROM table_a ace +WHERE ( + a = 1 + ) OR ( + b = 2 + ) +LIMIT 5 +; \ No newline at end of file diff --git a/examples/select_from.sql b/examples/select_from.sql new file mode 100644 index 0000000..24a1b86 --- /dev/null +++ b/examples/select_from.sql @@ -0,0 +1,3 @@ +SELECT a +FROM table_a +; \ No newline at end of file diff --git a/package.json b/package.json index 219dfc7..712f6a1 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,15 @@ "tsb": "tree-sitter build", "tsp": "tree-sitter parse", "tspa": "tree-sitter parse examples/**/*.sql --quiet --stat", - "node-gyp": "node-gyp" + "node-gyp": "node-gyp", + "render": "node src/scripts/plainRender.js" }, "dependencies": { "@duckdb/duckdb-wasm": "^1.29.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "tree-sitter": "^0.22.1" + "tree-sitter": "^0.22.1", + "yargs": "^17.7.2" }, "devDependencies": { "@eslint/js": "^9.11.1", diff --git a/renderers/basesql/renderer.js b/renderers/basesql/renderer.js new file mode 100644 index 0000000..05d6d07 --- /dev/null +++ b/renderers/basesql/renderer.js @@ -0,0 +1,3 @@ +export default renderer = { + alias_token: () => "AS", +}; diff --git a/src/converter/createAst.js b/src/converter/createAst.js new file mode 100644 index 0000000..a540f0a --- /dev/null +++ b/src/converter/createAst.js @@ -0,0 +1,149 @@ +// export type AstNode = { +// name: string; +// source: string; +// children: AstNode[]; +// }; + +const NEWLINE = "\n"; +const EMPTY_CHAR = ""; + +const OPEN_PAREN = "("; +const CLOSE_PAREN = ")"; + +const CLOSE_SQUARE = "]"; + +const NAME_SEP = " ["; +const RANGE_SEP = " - ["; +const LOCATION_SEP = ", "; + +function parseElement(line) { + const content = line.trim().slice(1); + const [nameAndStart, rawEnd] = content.split(RANGE_SEP); + const [name, rawStart] = nameAndStart.split(NAME_SEP); + const start = rawStart.split(CLOSE_SQUARE)[0].split(LOCATION_SEP); + const end = rawEnd.split(CLOSE_SQUARE)[0].split(LOCATION_SEP); + const element = { + name, + start: { + line: start[0], + char: start[1], + }, + end: { + line: end[0], + char: end[1], + }, + }; + return element; +} + +function getCumulativeCharsByLine(source) { + const lines = source.split(NEWLINE); + let totalChars = 0; + const cumulativeCharsByLine = []; + for (const line of lines) { + cumulativeCharsByLine.push(totalChars); + totalChars += line.length; + } + return cumulativeCharsByLine; +} + +function getRangeForSource(element, cumulativeCharsByLine) { + const start = cumulativeCharsByLine[element.start.line] + element.start.char; + const end = cumulativeCharsByLine[element.end.line] + element.end.char; + return { start, end }; +} + +function extractSource(element, source, cumulativeCharsByLine) { + const { start, end } = getRangeForSource(element, cumulativeCharsByLine); + const segment = source.slice(start, end); + return segment; +} + +function parseNode(line, source, cumulativeCharsByLine) { + const element = parseElement(line); + return { + name: element.name, + source: extractSource(element, source, cumulativeCharsByLine), + children: [], + }; +} + +function getNumberOfLevelsResolved(line) { + const squareParts = line.split(CLOSE_SQUARE); + const closeParens = squareParts[squareParts.length - 1]; + const pops = closeParens + .split(EMPTY_CHAR) + .filter((c) => c === CLOSE_PAREN).length; + const levels = pops - 1; + return Math.max(levels, 0); +} + +function findChildren(parent, records) { + const children = []; + const rest = []; + let hasChildren = true; + for (const record of records) { + if (record.level <= parent.level) { + hasChildren = false; + } + if (hasChildren) { + children.push(record); + } else { + rest.push(record); + } + } + return [children, rest]; +} + +function accumulateTreeLevel(dfsNodes) { + if (dfsNodes.length === 0) { + return []; + } + if (dfsNodes.length === 1) { + return [dfsNodes[0].node]; + } + + const level = []; + let remaining = dfsNodes; + while (remaining.length > 0) { + const [root, ...tree] = remaining; + if (tree.length > 0) { + const [children, rest] = findChildren(root, tree); + const level = accumulateTreeLevel(children); + root.node.children = level; + remaining = rest; + } + level.push(root.node); + } + return level; +} + +export function createAst(parsed, source) { + const parsedLines = parsed.split(NEWLINE); + const cumulativeCharsByLine = getCumulativeCharsByLine(source); + const dfsNodes = []; + let level = 0; + for (const rawLine of parsedLines) { + // Process node. + const line = rawLine.trim(); + const node = parseNode(line, source, cumulativeCharsByLine); + const isOpen = line.startsWith(OPEN_PAREN); + const isClosed = line.endsWith(CLOSE_PAREN); + const isLeaf = isOpen && isClosed; + const isParent = isOpen && !isClosed; + const levelsResolved = getNumberOfLevelsResolved(line); + + // Add node to array in depth-first search order. + dfsNodes.push({ node, level, isParent, isLeaf }); + + // Update level number. + if (isParent) { + level += 1; + } + level -= levelsResolved; + } + + const rootLevel = accumulateTreeLevel(dfsNodes); + const root = rootLevel[0]; + return root; +} diff --git a/src/converter/plainRenderer.js b/src/converter/plainRenderer.js new file mode 100644 index 0000000..6a7c8eb --- /dev/null +++ b/src/converter/plainRenderer.js @@ -0,0 +1,7 @@ +export function renderRoot(root, rendererMap) { + const render = rendererMap[root.name]; + if (!render) { + throw new Error(`No renderer found for node: ${root.name}`); + } + return render(root); +} diff --git a/src/converter/renderer.ts b/src/converter/renderer.ts new file mode 100644 index 0000000..3860914 --- /dev/null +++ b/src/converter/renderer.ts @@ -0,0 +1,19 @@ +export type AstNode = { + name: string; + source: string; + children: AstNode[]; +}; + +export type RenderFn = (node: AstNode) => string; + +export type RendererMap = { + [key: string]: RenderFn; +}; + +export function renderRoot(root: AstNode, rendererMap: RendererMap): string { + const render = rendererMap[root.name]; + if (!render) { + throw new Error(`No renderer found for node: ${root.name}`); + } + return render(root); +} diff --git a/src/scripts/plainRender.js b/src/scripts/plainRender.js new file mode 100644 index 0000000..6b0766d --- /dev/null +++ b/src/scripts/plainRender.js @@ -0,0 +1,15 @@ +// import { renderRoot } from "../plainRenderer"; +// import baseSqlRenderer from "../../renderers/basesql/renderer"; +import { createAst } from "../converter/createAst.js"; +import fs from "fs"; + +const argv = { + parsed: "asts/select_from.ast", + source: "examples/select_from.sql", + out: "asts/select_from.json", +}; + +const parsed = fs.readFileSync(argv.parsed).toString(); +const source = fs.readFileSync(argv.source).toString(); +const ast = createAst(parsed, source); +fs.writeFileSync(argv.out, JSON.stringify(ast, undefined, 2)); diff --git a/src/scripts/render.ts b/src/scripts/render.ts new file mode 100644 index 0000000..43644f2 --- /dev/null +++ b/src/scripts/render.ts @@ -0,0 +1,19 @@ +// import { renderRoot } from "../renderer"; +// import baseSqlRenderer from "../../renderers/basesql/renderer"; +// import yargs from "yargs"; +// import fs from "fs"; + +// const argv = yargs +// .option("source", { +// type: "string", +// demandOption: true, +// }) +// .option("renderer", { +// type: "string", +// default: "basesql", +// }) +// .help().argv; + +// const sourceContents = fs.readFileSync(argv.source); + +// console.log(sourceContents); diff --git a/yarn.lock b/yarn.lock index 187fe93..68556d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -910,6 +910,15 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + color-convert@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" @@ -1044,7 +1053,7 @@ esbuild@^0.21.3: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" -escalade@^3.2.0: +escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== @@ -1273,6 +1282,11 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1834,6 +1848,11 @@ react@^18.3.1: dependencies: loose-envify "^1.1.0" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -1970,7 +1989,7 @@ ssri@^10.0.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^4.1.0: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -2185,6 +2204,15 @@ wordwrapjs@^5.1.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -2194,6 +2222,11 @@ wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -2204,6 +2237,24 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" From 4ddb6892d31415b4fd50e5654e9161d049497527 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Thu, 14 Nov 2024 21:47:26 -0500 Subject: [PATCH 12/17] First draft of renderer. --- .gitignore | 6 ++++- asts/select_from.json | 40 ---------------------------------- src/converter/createAst.js | 10 ++++----- src/converter/plainRenderer.js | 15 +++++++++---- src/scripts/plainRender.js | 11 +++++++--- 5 files changed, 29 insertions(+), 53 deletions(-) delete mode 100644 asts/select_from.json diff --git a/.gitignore b/.gitignore index 8fe6e5e..7e5abf8 100644 --- a/.gitignore +++ b/.gitignore @@ -140,4 +140,8 @@ src/tree_sitter/** src/grammar.json src/node-types.json src/parser.c -parser.dylib \ No newline at end of file +parser.dylib + +# Project +asts/** +zqlout/** \ No newline at end of file diff --git a/asts/select_from.json b/asts/select_from.json deleted file mode 100644 index 933b2c3..0000000 --- a/asts/select_from.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "source_file", - "source": "SELECT a\nFROM table_a\n;", - "children": [ - { - "name": "select_statement", - "source": "SELECT a\nFROM table_a\n;", - "children": [ - { - "name": "column_reference", - "source": "a", - "children": [ - { - "name": "identifier", - "source": "a", - "children": [] - } - ] - }, - { - "name": "table_alias", - "source": "", - "children": [ - { - "name": "table_name", - "source": "", - "children": [ - { - "name": "identifier", - "source": "", - "children": [] - } - ] - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/src/converter/createAst.js b/src/converter/createAst.js index a540f0a..e0a6d41 100644 --- a/src/converter/createAst.js +++ b/src/converter/createAst.js @@ -25,12 +25,12 @@ function parseElement(line) { const element = { name, start: { - line: start[0], - char: start[1], + line: parseInt(start[0], 10), + char: parseInt(start[1], 10), }, end: { - line: end[0], - char: end[1], + line: parseInt(end[0], 10), + char: parseInt(end[1], 10), }, }; return element; @@ -49,7 +49,7 @@ function getCumulativeCharsByLine(source) { function getRangeForSource(element, cumulativeCharsByLine) { const start = cumulativeCharsByLine[element.start.line] + element.start.char; - const end = cumulativeCharsByLine[element.end.line] + element.end.char; + const end = cumulativeCharsByLine[element.end.line] + element.end.char + 1; return { start, end }; } diff --git a/src/converter/plainRenderer.js b/src/converter/plainRenderer.js index 6a7c8eb..de32f38 100644 --- a/src/converter/plainRenderer.js +++ b/src/converter/plainRenderer.js @@ -1,7 +1,14 @@ -export function renderRoot(root, rendererMap) { - const render = rendererMap[root.name]; +function renderDefault(node, rendererMap) { + if (node.children.length > 0) { + return node.children.map((c) => renderNode(c, rendererMap)).join(""); + } + return node.source; +} + +export function renderNode(node, rendererMap) { + const render = rendererMap[node.name]; if (!render) { - throw new Error(`No renderer found for node: ${root.name}`); + return renderDefault(node, rendererMap); } - return render(root); + return render(node); } diff --git a/src/scripts/plainRender.js b/src/scripts/plainRender.js index 6b0766d..a4c6835 100644 --- a/src/scripts/plainRender.js +++ b/src/scripts/plainRender.js @@ -1,15 +1,20 @@ // import { renderRoot } from "../plainRenderer"; // import baseSqlRenderer from "../../renderers/basesql/renderer"; import { createAst } from "../converter/createAst.js"; +import { renderNode } from "../converter/plainRenderer.js"; import fs from "fs"; const argv = { parsed: "asts/select_from.ast", source: "examples/select_from.sql", - out: "asts/select_from.json", + ast: "asts/select_from.json", + out: "zqlout/select_from.zql", }; const parsed = fs.readFileSync(argv.parsed).toString(); const source = fs.readFileSync(argv.source).toString(); -const ast = createAst(parsed, source); -fs.writeFileSync(argv.out, JSON.stringify(ast, undefined, 2)); +const root = createAst(parsed, source); +fs.writeFileSync(argv.ast, JSON.stringify(root, undefined, 2)); + +const zql = renderNode(root, {}); +fs.writeFileSync(argv.out, zql); From d3e7358cba00412a330662df25a7f7851239c1fb Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Thu, 14 Nov 2024 22:36:03 -0500 Subject: [PATCH 13/17] Fix renderer bugs. --- asts/select_from.ast | 21 +++++-- grammars/basesql/grammar.js | 82 +++++++++++++------------ renderers/basesql/renderer.js | 3 - src/converter/createAst.js | 99 +++++++++++++++++++++---------- src/converter/plainRenderer.js | 12 ++-- src/renderers/basesql/renderer.js | 5 ++ src/renderers/zql/renderer.js | 5 ++ src/scripts/plainRender.js | 3 +- 8 files changed, 143 insertions(+), 87 deletions(-) delete mode 100644 renderers/basesql/renderer.js create mode 100644 src/renderers/basesql/renderer.js create mode 100644 src/renderers/zql/renderer.js diff --git a/asts/select_from.ast b/asts/select_from.ast index dd37337..5eec20e 100644 --- a/asts/select_from.ast +++ b/asts/select_from.ast @@ -1,7 +1,16 @@ (source_file [0, 0] - [2, 1] - (select_statement [0, 0] - [1, 12] - (column_reference [0, 7] - [0, 8] - (identifier [0, 7] - [0, 8])) - (table_alias [1, 5] - [1, 12] - (table_name [1, 5] - [1, 12] - (identifier [1, 5] - [1, 12]))))) \ No newline at end of file + (statement [0, 0] - [2, 1] + (select_statement [0, 0] - [1, 12] + (select_token [0, 0] - [0, 6]) + (select_elements [0, 7] - [0, 8] + (select_element [0, 7] - [0, 8] + (expression [0, 7] - [0, 8] + (column_reference [0, 7] - [0, 8] + (identifier [0, 7] - [0, 8]))))) + (from_clause [1, 0] - [1, 12] + (from_token [1, 0] - [1, 4]) + (table_reference [1, 5] - [1, 12] + (table_alias [1, 5] - [1, 12] + (table_name [1, 5] - [1, 12] + (identifier [1, 5] - [1, 12])))))) + (terminal [2, 0] - [2, 1]))) \ No newline at end of file diff --git a/grammars/basesql/grammar.js b/grammars/basesql/grammar.js index 216ef97..8b8ed00 100644 --- a/grammars/basesql/grammar.js +++ b/grammars/basesql/grammar.js @@ -11,9 +11,11 @@ export default grammar({ name: "basesql", rules: { - source_file: ($) => repeat($._statement), + source_file: ($) => repeat($.statement), - _statement: ($) => + terminal: () => token(";"), + + statement: ($) => seq( choice( $.select_statement, @@ -22,25 +24,27 @@ export default grammar({ $.delete_statement, $.create_table_statement ), - optional(";") + optional($.terminal) ), + select_token: () => token("SELECT"), + // SELECT statement and its components select_statement: ($) => seq( - "SELECT", - $._select_elements, - optional($._from_clause), - optional($._where_clause), - optional($._group_by_clause), - optional($._having_clause), - optional($._order_by_clause), - optional($._limit_clause) + $.select_token, + $.select_elements, + optional($.from_clause), + optional($.where_clause), + optional($.group_by_clause), + optional($.having_clause), + optional($.order_by_clause), + optional($.limit_clause) ), - _select_elements: ($) => choice("*", commaSep1($._select_element)), + select_elements: ($) => choice("*", commaSep1($.select_element)), - _select_element: ($) => seq($._expression, optional($.alias_suffix)), + select_element: ($) => seq($.expression, optional($.alias_suffix)), alias_suffix: ($) => choice( @@ -52,13 +56,15 @@ export default grammar({ alias_token: ($) => token("AS"), - _from_clause: ($) => seq("FROM", commaSep1($._table_reference)), + from_token: () => token("FROM"), + + from_clause: ($) => seq($.from_token, commaSep1($.table_reference)), - _table_reference: ($) => choice($.table_alias, $.join_clause), + table_reference: ($) => choice($.table_alias, $.join_clause), table_alias: ($) => seq($.table_name, optional($.alias_suffix)), - join_clause: ($) => prec.left(2, seq($._table_reference, $.join_list)), + join_clause: ($) => prec.left(2, seq($.table_reference, $.join_list)), join_table: ($) => prec.left( @@ -70,27 +76,26 @@ export default grammar({ seq("INNER", "JOIN"), seq("FULL", optional("OUTER"), "JOIN") ), - $._table_reference, + $.table_reference, "ON", - $._expression + $.expression ) ), join_list: ($) => prec.left(1, seq($.join_table, optional(seq(",", $.join_table)))), - _where_clause: ($) => seq("WHERE", $._expression), + where_clause: ($) => seq("WHERE", $.expression), - _group_by_clause: ($) => seq("GROUP", "BY", commaSep1($._expression)), + group_by_clause: ($) => seq("GROUP", "BY", commaSep1($.expression)), - _having_clause: ($) => seq("HAVING", $._expression), + having_clause: ($) => seq("HAVING", $.expression), - _order_by_clause: ($) => seq("ORDER", "BY", commaSep1($.order_by_element)), + order_by_clause: ($) => seq("ORDER", "BY", commaSep1($.order_by_element)), - order_by_element: ($) => - seq($._expression, optional(choice("ASC", "DESC"))), + order_by_element: ($) => seq($.expression, optional(choice("ASC", "DESC"))), - _limit_clause: ($) => seq("LIMIT", $.number), + limit_clause: ($) => seq("LIMIT", $.number), // INSERT statement insert_statement: ($) => @@ -102,7 +107,7 @@ export default grammar({ optional(seq("(", commaSep1($.identifier), ")")), choice( // VALUES syntax - seq("VALUES", commaSep1(seq("(", commaSep1($._expression), ")"))), + seq("VALUES", commaSep1(seq("(", commaSep1($.expression), ")"))), // SELECT syntax seq( optional(seq("(", commaSep1($.identifier), ")")), @@ -119,14 +124,14 @@ export default grammar({ $.table_name, "SET", commaSep1($.update_assignment), - optional($._where_clause) + optional($.where_clause) ), - update_assignment: ($) => seq($.identifier, "=", $._expression), + update_assignment: ($) => seq($.identifier, "=", $.expression), // DELETE statement delete_statement: ($) => - seq("DELETE", "FROM", $.table_name, optional($._where_clause)), + seq("DELETE", "FROM", $.table_name, optional($.where_clause)), // CREATE TABLE statement create_table_statement: ($) => @@ -166,12 +171,11 @@ export default grammar({ "PRIMARY KEY", "NOT NULL", "UNIQUE", - seq("DEFAULT", $._expression), + seq("DEFAULT", $.expression), seq("REFERENCES", $.table_name, optional(seq("(", $.identifier, ")"))) ), - // Basic expressions - _expression: ($) => + expression: ($) => prec( 0, choice( @@ -202,25 +206,25 @@ export default grammar({ ["*", 5], ["/", 5], ].map(([operator, precedence]) => - prec.left(precedence, seq($._expression, operator, $._expression)) + prec.left(precedence, seq($.expression, operator, $.expression)) ), - prec.left(3, seq($._expression, "IS", "NULL")), - prec.left(3, seq($._expression, "IS", "NOT", "NULL")) + prec.left(3, seq($.expression, "IS", "NULL")), + prec.left(3, seq($.expression, "IS", "NOT", "NULL")) ), unary_expression: ($) => choice( - prec(6, seq("NOT", $._expression)), - prec(6, seq("-", $._expression)) + prec(6, seq("NOT", $.expression)), + prec(6, seq("-", $.expression)) ), - parenthesized_expression: ($) => seq("(", $._expression, ")"), + parenthesized_expression: ($) => seq("(", $.expression, ")"), function_call: ($) => seq( $.identifier, "(", - choice("*", optional(commaSep1($._expression))), + choice("*", optional(commaSep1($.expression))), ")" ), diff --git a/renderers/basesql/renderer.js b/renderers/basesql/renderer.js deleted file mode 100644 index 05d6d07..0000000 --- a/renderers/basesql/renderer.js +++ /dev/null @@ -1,3 +0,0 @@ -export default renderer = { - alias_token: () => "AS", -}; diff --git a/src/converter/createAst.js b/src/converter/createAst.js index e0a6d41..5797f98 100644 --- a/src/converter/createAst.js +++ b/src/converter/createAst.js @@ -5,6 +5,7 @@ // }; const NEWLINE = "\n"; +const SPACE = " "; const EMPTY_CHAR = ""; const OPEN_PAREN = "("; @@ -42,14 +43,17 @@ function getCumulativeCharsByLine(source) { const cumulativeCharsByLine = []; for (const line of lines) { cumulativeCharsByLine.push(totalChars); - totalChars += line.length; + // Add one for the newline character. + // The last line does not get counted because we only store + // cumulative characters before each line. + totalChars += line.length + 1; } return cumulativeCharsByLine; } function getRangeForSource(element, cumulativeCharsByLine) { const start = cumulativeCharsByLine[element.start.line] + element.start.char; - const end = cumulativeCharsByLine[element.end.line] + element.end.char + 1; + const end = cumulativeCharsByLine[element.end.line] + element.end.char; return { start, end }; } @@ -61,13 +65,52 @@ function extractSource(element, source, cumulativeCharsByLine) { function parseNode(line, source, cumulativeCharsByLine) { const element = parseElement(line); + const { name, start, end } = element; return { - name: element.name, + name: name, + range: { start, end }, source: extractSource(element, source, cumulativeCharsByLine), children: [], }; } +function addWhitespaceNodes(siblings) { + if (siblings.length === 0) { + return []; + } + const allNodes = [siblings[0]]; + for (let i = 1; i < siblings.length; i++) { + const previousNode = siblings[i - 1]; + const node = siblings[i]; + const lineDiff = node.range.start.line - previousNode.range.end.line; + const sameLineCharDiff = + node.range.start.char - previousNode.range.end.char; + if (lineDiff === 0) { + if (sameLineCharDiff > 0) { + allNodes.push({ + name: "space", + source: Array(sameLineCharDiff).fill(SPACE).join(EMPTY_CHAR), + children: [], + }); + } + } else { + for (let j = 0; j < lineDiff; j++) { + allNodes.push({ + name: "newline", + range: { + start: previousNode.range.end, + end: { line: previousNode.range.end.line + 1, char: 0 }, + }, + source: NEWLINE, + children: [], + }); + } + } + allNodes.push(node); + } + return allNodes; +} + function getNumberOfLevelsResolved(line) { const squareParts = line.split(CLOSE_SQUARE); const closeParens = squareParts[squareParts.length - 1]; @@ -78,23 +121,6 @@ function getNumberOfLevelsResolved(line) { return Math.max(levels, 0); } -function findChildren(parent, records) { - const children = []; - const rest = []; - let hasChildren = true; - for (const record of records) { - if (record.level <= parent.level) { - hasChildren = false; - } - if (hasChildren) { - children.push(record); - } else { - rest.push(record); - } - } - return [children, rest]; -} - function accumulateTreeLevel(dfsNodes) { if (dfsNodes.length === 0) { return []; @@ -103,19 +129,30 @@ function accumulateTreeLevel(dfsNodes) { return [dfsNodes[0].node]; } - const level = []; - let remaining = dfsNodes; - while (remaining.length > 0) { - const [root, ...tree] = remaining; - if (tree.length > 0) { - const [children, rest] = findChildren(root, tree); - const level = accumulateTreeLevel(children); - root.node.children = level; - remaining = rest; + const firstNode = dfsNodes[0]; + const currentLevel = firstNode.level; + const levelNodes = []; + let currentParent = null; + let currentDescendants = []; + for (let i = 0; i < dfsNodes.length; i++) { + const node = dfsNodes[i]; + if (node.level === currentLevel) { + if (currentParent != null) { + currentParent.children = accumulateTreeLevel(currentDescendants); + levelNodes.push(currentParent); + currentDescendants = []; + } + currentParent = node.node; + } else { + currentDescendants.push(node); } - level.push(root.node); } - return level; + if (currentParent != null) { + currentParent.children = accumulateTreeLevel(currentDescendants); + levelNodes.push(currentParent); + currentDescendants = []; + } + return addWhitespaceNodes(levelNodes); } export function createAst(parsed, source) { diff --git a/src/converter/plainRenderer.js b/src/converter/plainRenderer.js index de32f38..5dfd2ad 100644 --- a/src/converter/plainRenderer.js +++ b/src/converter/plainRenderer.js @@ -1,14 +1,12 @@ -function renderDefault(node, rendererMap) { +export function renderNode(node, rendererMap) { if (node.children.length > 0) { return node.children.map((c) => renderNode(c, rendererMap)).join(""); } - return node.source; -} -export function renderNode(node, rendererMap) { const render = rendererMap[node.name]; - if (!render) { - return renderDefault(node, rendererMap); + if (render) { + return render(node); } - return render(node); + + return node.source; } diff --git a/src/renderers/basesql/renderer.js b/src/renderers/basesql/renderer.js new file mode 100644 index 0000000..9b203ac --- /dev/null +++ b/src/renderers/basesql/renderer.js @@ -0,0 +1,5 @@ +export default { + select_token: () => "SELECT", + from_token: () => "FROM", + terminal: () => ";", +}; diff --git a/src/renderers/zql/renderer.js b/src/renderers/zql/renderer.js new file mode 100644 index 0000000..92651f3 --- /dev/null +++ b/src/renderers/zql/renderer.js @@ -0,0 +1,5 @@ +export default { + select_token: () => "its giving", + from_token: () => "yass", + terminal: () => "no cap", +}; diff --git a/src/scripts/plainRender.js b/src/scripts/plainRender.js index a4c6835..bb03c47 100644 --- a/src/scripts/plainRender.js +++ b/src/scripts/plainRender.js @@ -2,6 +2,7 @@ // import baseSqlRenderer from "../../renderers/basesql/renderer"; import { createAst } from "../converter/createAst.js"; import { renderNode } from "../converter/plainRenderer.js"; +import zqlRenderer from "../renderers/zql/renderer.js"; import fs from "fs"; const argv = { @@ -16,5 +17,5 @@ const source = fs.readFileSync(argv.source).toString(); const root = createAst(parsed, source); fs.writeFileSync(argv.ast, JSON.stringify(root, undefined, 2)); -const zql = renderNode(root, {}); +const zql = renderNode(root, zqlRenderer); fs.writeFileSync(argv.out, zql); From d6fb709bcdb4016573cacac53af8ebe54447b59f Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Thu, 14 Nov 2024 22:37:32 -0500 Subject: [PATCH 14/17] Remove AST files from git. --- asts/function_call.ast | 47 ----------------------------------------- asts/function_call.json | 0 asts/select_from.ast | 16 -------------- 3 files changed, 63 deletions(-) delete mode 100644 asts/function_call.ast delete mode 100644 asts/function_call.json delete mode 100644 asts/select_from.ast diff --git a/asts/function_call.ast b/asts/function_call.ast deleted file mode 100644 index f57f517..0000000 --- a/asts/function_call.ast +++ /dev/null @@ -1,47 +0,0 @@ -(source_file [0, 0] - [17, 1] - (select_statement [0, 0] - [16, 7] - (column_reference [1, 4] - [1, 12] - (identifier [1, 4] - [1, 12])) - (alias_suffix [1, 13] - [1, 17] - (alias_token [1, 13] - [1, 15]) - (identifier [1, 16] - [1, 17])) - (literal [2, 4] - [2, 6] - (number [2, 4] - [2, 6])) - (function_call [3, 4] - [3, 14] - (identifier [3, 4] - [3, 8]) - (column_reference [3, 9] - [3, 10] - (identifier [3, 9] - [3, 10])) - (column_reference [3, 12] - [3, 13] - (identifier [3, 12] - [3, 13]))) - (function_call [4, 4] - [9, 5] - (identifier [4, 4] - [4, 13]) - (column_reference [5, 8] - [5, 9] - (identifier [5, 8] - [5, 9])) - (literal [6, 8] - [6, 9] - (number [6, 8] - [6, 9])) - (column_reference [7, 8] - [7, 9] - (identifier [7, 8] - [7, 9])) - (literal [8, 8] - [8, 9] - (number [8, 8] - [8, 9]))) - (alias_suffix [9, 6] - [9, 13] - (alias_token [9, 6] - [9, 8]) - (identifier [9, 9] - [9, 13])) - (table_alias [10, 5] - [10, 16] - (table_name [10, 5] - [10, 12] - (identifier [10, 5] - [10, 12])) - (alias_suffix [10, 13] - [10, 16] - (identifier [10, 13] - [10, 16]))) - (binary_expression [11, 6] - [15, 1] - (parenthesized_expression [11, 6] - [13, 1] - (binary_expression [12, 4] - [12, 9] - (column_reference [12, 4] - [12, 5] - (identifier [12, 4] - [12, 5])) - (literal [12, 8] - [12, 9] - (number [12, 8] - [12, 9])))) - (parenthesized_expression [13, 5] - [15, 1] - (binary_expression [14, 4] - [14, 9] - (column_reference [14, 4] - [14, 5] - (identifier [14, 4] - [14, 5])) - (literal [14, 8] - [14, 9] - (number [14, 8] - [14, 9]))))) - (number [16, 6] - [16, 7]))) \ No newline at end of file diff --git a/asts/function_call.json b/asts/function_call.json deleted file mode 100644 index e69de29..0000000 diff --git a/asts/select_from.ast b/asts/select_from.ast deleted file mode 100644 index 5eec20e..0000000 --- a/asts/select_from.ast +++ /dev/null @@ -1,16 +0,0 @@ -(source_file [0, 0] - [2, 1] - (statement [0, 0] - [2, 1] - (select_statement [0, 0] - [1, 12] - (select_token [0, 0] - [0, 6]) - (select_elements [0, 7] - [0, 8] - (select_element [0, 7] - [0, 8] - (expression [0, 7] - [0, 8] - (column_reference [0, 7] - [0, 8] - (identifier [0, 7] - [0, 8]))))) - (from_clause [1, 0] - [1, 12] - (from_token [1, 0] - [1, 4]) - (table_reference [1, 5] - [1, 12] - (table_alias [1, 5] - [1, 12] - (table_name [1, 5] - [1, 12] - (identifier [1, 5] - [1, 12])))))) - (terminal [2, 0] - [2, 1]))) \ No newline at end of file From 725771bc1ed606d0d8c45730a698e077c478f3a0 Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Thu, 14 Nov 2024 22:40:43 -0500 Subject: [PATCH 15/17] Only use one newline. --- src/converter/createAst.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/converter/createAst.js b/src/converter/createAst.js index 5797f98..6daee7f 100644 --- a/src/converter/createAst.js +++ b/src/converter/createAst.js @@ -94,17 +94,11 @@ function addWhitespaceNodes(siblings) { }); } } else { - for (let j = 0; j < lineDiff; j++) { - allNodes.push({ - name: "newline", - range: { - start: previousNode.range.end, - end: { line: previousNode.range.end.line + 1, char: 0 }, - }, - source: NEWLINE, - children: [], - }); - } + allNodes.push({ + name: "newline", + source: Array(lineDiff).fill(NEWLINE).join(EMPTY_CHAR), + children: [], + }); } allNodes.push(node); } From 1a995e7c3416c848aaa053e13d9b148ed4c0da0f Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Thu, 14 Nov 2024 23:52:16 -0500 Subject: [PATCH 16/17] Remove node-gyp. --- binding.gyp | 20 --- package.json | 2 - program.cjs | 12 -- yarn.lock | 420 +-------------------------------------------------- 4 files changed, 3 insertions(+), 451 deletions(-) delete mode 100644 binding.gyp delete mode 100644 program.cjs diff --git a/binding.gyp b/binding.gyp deleted file mode 100644 index e7dddbd..0000000 --- a/binding.gyp +++ /dev/null @@ -1,20 +0,0 @@ -{ - "targets": [ - { - "target_name": "parser", - "sources": [ "src/parser.c" ], - "include_dirs": [ - "= 2.1.2 < 3.0.0" - ignore@^5.2.0, ignore@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" @@ -1642,24 +1490,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - insert-css@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/insert-css/-/insert-css-0.0.0.tgz#2304bfa6f893abecb8ff9ca8d9c7605d94cf2911" integrity sha512-PwixL1rVtKkM1gz43tEHwZ2sUOYmWB5zk/9YiEmOxERqjfIkkMY4jwrl3v3e9NLzblEdkBuMLiTLm/0sHMx4qA== -ip-address@^9.0.5: - version "9.0.5" - resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" - integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== - dependencies: - jsbn "1.1.0" - sprintf-js "^1.1.3" - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -1677,11 +1512,6 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -1692,20 +1522,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isexe@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" - integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== - -jackspeak@^3.1.2: - version "3.4.3" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-3.4.3.tgz#8833a9d89ab4acde6188942bd1c53b6390ed5a8a" - integrity sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - jackspeak@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-4.0.2.tgz#11f9468a3730c6ff6f56823a820d7e3be9bef015" @@ -1733,11 +1549,6 @@ js-yaml@~3.0.2: argparse "~ 0.1.11" esprima "~ 1.0.2" -jsbn@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" - integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== - jsesc@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" @@ -1831,11 +1642,6 @@ lru-cache@2: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" integrity sha512-WpibWJ60c3AgAz8a2iYErDrcT2C7OmKnsWhIcHOjkUHFjkXncJhtLxNSqUmxRxRunpb5I8Vprd7aNSd2NtksJQ== -lru-cache@^10.0.1, lru-cache@^10.2.0: - version "10.4.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" - integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== - lru-cache@^11.0.0: version "11.0.2" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-11.0.2.tgz#fbd8e7cf8211f5e7e5d91905c415a3f55755ca39" @@ -1848,24 +1654,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -make-fetch-happen@^13.0.0: - version "13.0.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.1.tgz#273ba2f78f45e1f3a6dca91cede87d9fa4821e36" - integrity sha512-cKTUFc/rbKUd/9meOvgrpJ2WrNzymt6jfRDdwg5UCnVzv9dTpEj9JS5m3wtziXVCjluIXyL8pcaukYqezIzZQA== - dependencies: - "@npmcli/agent" "^2.0.0" - cacache "^18.0.0" - http-cache-semantics "^4.1.1" - is-lambda "^1.0.1" - minipass "^7.0.2" - minipass-fetch "^3.0.0" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - proc-log "^4.2.0" - promise-retry "^2.0.1" - ssri "^10.0.0" - merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -1913,75 +1701,11 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" integrity sha512-iotkTvxc+TwOm5Ieim8VnSNvCDjCK9S8G3scJ50ZthspSxa7jx50jkhYduuAtAjvfDUwSgOwf8+If99AlOEhyw== -minipass-collect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" - integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== - dependencies: - minipass "^7.0.3" - -minipass-fetch@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.5.tgz#f0f97e40580affc4a35cc4a1349f05ae36cb1e4c" - integrity sha512-2N8elDQAtSnFV0Dk7gt15KHsS0Fyz6CbYZ360h0WTYV1Ty46li3rAXVOQj1THMNLdmrD9Vt5pBPtWtVkpwGBqg== - dependencies: - minipass "^7.0.3" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3, minipass@^7.1.2: +minipass@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.1.1, minizlib@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" @@ -1997,11 +1721,6 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -negotiator@^0.6.3: - version "0.6.4" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" - integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== - node-addon-api@^8.2.1: version "8.2.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-8.2.2.tgz#3658f78d04d260aa95931d3bbc45f22ce433b821" @@ -2012,22 +1731,6 @@ node-gyp-build@^4.8.2: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.3.tgz#9187216d24dbee29e44eb20d2ebf62a296bbea1a" integrity sha512-EMS95CMJzdoSKoIiXo8pxKoL8DYxwIZXYlLmgPb8KUv794abpnLK6ynsCAWNliOjREKruYKdzbh76HHYUHX7nw== -node-gyp@^10.2.0: - version "10.2.0" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.2.0.tgz#80101c4aa4f7ab225f13fcc8daaaac4eb1a8dd86" - integrity sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw== - dependencies: - env-paths "^2.2.0" - exponential-backoff "^3.1.1" - glob "^10.3.10" - graceful-fs "^4.2.6" - make-fetch-happen "^13.0.0" - nopt "^7.0.0" - proc-log "^4.1.0" - semver "^7.3.5" - tar "^6.2.1" - which "^4.0.0" - node-releases@^2.0.18: version "2.0.18" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" @@ -2041,13 +1744,6 @@ nomnom@^1.5.x: chalk "~0.4.0" underscore "~1.6.0" -nopt@^7.0.0: - version "7.2.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.1.tgz#1cac0eab9b8e97c9093338446eddd40b2c8ca1e7" - integrity sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w== - dependencies: - abbrev "^2.0.0" - optimist@>=0.2.8: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -2082,13 +1778,6 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - package-json-from-dist@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" @@ -2111,14 +1800,6 @@ path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-scurry@^1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.11.1.tgz#7960a668888594a0720b12a911d1a742ab9f11d2" - integrity sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA== - dependencies: - lru-cache "^10.2.0" - minipass "^5.0.0 || ^6.0.2 || ^7.0.0" - path-scurry@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-2.0.0.tgz#9f052289f23ad8bf9397a2a0425e7b8615c58580" @@ -2151,19 +1832,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -proc-log@^4.1.0, proc-log@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" - integrity sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" @@ -2209,11 +1877,6 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2253,11 +1916,6 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - scheduler@^0.23.2: version "0.23.2" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3" @@ -2270,7 +1928,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.6.0: +semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -2302,45 +1960,11 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socks-proxy-agent@^8.0.3: - version "8.0.4" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c" - integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw== - dependencies: - agent-base "^7.1.1" - debug "^4.3.4" - socks "^2.8.3" - -socks@^2.8.3: - version "2.8.3" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" - integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== - dependencies: - ip-address "^9.0.5" - smart-buffer "^4.2.0" - source-map-js@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.1.tgz#1ce5650fddd87abc099eda37dcff024c2667ae46" integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== -sprintf-js@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" - integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== - -ssri@^10.0.0: - version "10.0.6" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.6.tgz#a8aade2de60ba2bce8688e3fa349bad05c7dc1e5" - integrity sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ== - dependencies: - minipass "^7.0.3" - "string-width-cjs@npm:string-width@^4.2.0": version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -2419,18 +2043,6 @@ table-layout@^4.1.0: array-back "^6.2.2" wordwrapjs "^5.1.0" -tar@^6.1.11, tar@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" - integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -2522,20 +2134,6 @@ undici-types@~6.19.2: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== -unique-filename@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" - integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== - dependencies: - unique-slug "^4.0.0" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - update-browserslist-db@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" @@ -2574,13 +2172,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -which@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" - integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== - dependencies: - isexe "^3.1.1" - word-wrap@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" @@ -2633,11 +2224,6 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" From 10eef5fc0fea886fb02be4c43e2e6f8aa840ea3e Mon Sep 17 00:00:00 2001 From: Vinesh Kannan Date: Fri, 15 Nov 2024 00:12:43 -0500 Subject: [PATCH 17/17] Typescriptify --- package.json | 4 +- src/converter/{createAst.js => createAst.ts} | 66 +++++-- src/converter/plainRenderer.js | 12 -- src/converter/renderer.ts | 21 ++- src/renderers/zql/renderer.d.ts | 5 + src/scripts/plainRender.js | 21 --- src/scripts/render.ts | 32 ++-- yarn.lock | 184 +++++++++++++++++++ 8 files changed, 271 insertions(+), 74 deletions(-) rename src/converter/{createAst.js => createAst.ts} (77%) delete mode 100644 src/converter/plainRenderer.js create mode 100644 src/renderers/zql/renderer.d.ts delete mode 100644 src/scripts/plainRender.js diff --git a/package.json b/package.json index 85c7ee4..7ac843b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "tsb": "tree-sitter build", "tsp": "tree-sitter parse", "tspa": "tree-sitter parse examples/**/*.sql --quiet --stat", - "render": "node src/scripts/plainRender.js" + "render": "tsx src/scripts/render.ts" }, "dependencies": { "@codemirror/lang-sql": "^6.8.0", @@ -23,12 +23,14 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "tree-sitter": "^0.22.1", + "tsx": "^4.19.2", "yargs": "^17.7.2" }, "devDependencies": { "@eslint/js": "^9.11.1", "@types/react": "^18.3.10", "@types/react-dom": "^18.3.0", + "@types/yargs": "^17.0.33", "@vitejs/plugin-react": "^4.3.2", "eslint": "^9.11.1", "eslint-plugin-react-hooks": "^5.1.0-rc.0", diff --git a/src/converter/createAst.js b/src/converter/createAst.ts similarity index 77% rename from src/converter/createAst.js rename to src/converter/createAst.ts index 6daee7f..822edc6 100644 --- a/src/converter/createAst.js +++ b/src/converter/createAst.ts @@ -1,8 +1,27 @@ -// export type AstNode = { -// name: string; -// source: string; -// children: AstNode[]; -// }; +type SourcePosition = { + line: number; + char: number; +}; + +type AstElement = { + name: string; + start: SourcePosition; + end: SourcePosition; +}; + +export type AstNode = { + name: string; + range: { start: SourcePosition; end: SourcePosition }; + source: string; + children: AstNode[]; +}; + +type AstNodeContext = { + node: AstNode; + level: number; + isParent: boolean; + isLeaf: boolean; +}; const NEWLINE = "\n"; const SPACE = " "; @@ -17,7 +36,7 @@ const NAME_SEP = " ["; const RANGE_SEP = " - ["; const LOCATION_SEP = ", "; -function parseElement(line) { +function parseElement(line: string): AstElement { const content = line.trim().slice(1); const [nameAndStart, rawEnd] = content.split(RANGE_SEP); const [name, rawStart] = nameAndStart.split(NAME_SEP); @@ -37,7 +56,7 @@ function parseElement(line) { return element; } -function getCumulativeCharsByLine(source) { +function getCumulativeCharsByLine(source: string): number[] { const lines = source.split(NEWLINE); let totalChars = 0; const cumulativeCharsByLine = []; @@ -51,19 +70,30 @@ function getCumulativeCharsByLine(source) { return cumulativeCharsByLine; } -function getRangeForSource(element, cumulativeCharsByLine) { +function getRangeForSource( + element: AstElement, + cumulativeCharsByLine: number[] +): { start: number; end: number } { const start = cumulativeCharsByLine[element.start.line] + element.start.char; const end = cumulativeCharsByLine[element.end.line] + element.end.char; return { start, end }; } -function extractSource(element, source, cumulativeCharsByLine) { +function extractSource( + element: AstElement, + source: string, + cumulativeCharsByLine: number[] +): string { const { start, end } = getRangeForSource(element, cumulativeCharsByLine); const segment = source.slice(start, end); return segment; } -function parseNode(line, source, cumulativeCharsByLine) { +function parseNode( + line: string, + source: string, + cumulativeCharsByLine: number[] +): AstNode { const element = parseElement(line); const { name, start, end } = element; return { @@ -74,7 +104,7 @@ function parseNode(line, source, cumulativeCharsByLine) { }; } -function addWhitespaceNodes(siblings) { +function addWhitespaceNodes(siblings: AstNode[]): AstNode[] { if (siblings.length === 0) { return []; } @@ -89,6 +119,10 @@ function addWhitespaceNodes(siblings) { if (sameLineCharDiff > 0) { allNodes.push({ name: "space", + range: { + start: previousNode.range.end, + end: node.range.start, + }, source: Array(sameLineCharDiff).fill(SPACE).join(EMPTY_CHAR), children: [], }); @@ -96,6 +130,10 @@ function addWhitespaceNodes(siblings) { } else { allNodes.push({ name: "newline", + range: { + start: previousNode.range.end, + end: node.range.start, + }, source: Array(lineDiff).fill(NEWLINE).join(EMPTY_CHAR), children: [], }); @@ -105,7 +143,7 @@ function addWhitespaceNodes(siblings) { return allNodes; } -function getNumberOfLevelsResolved(line) { +function getNumberOfLevelsResolved(line: string): number { const squareParts = line.split(CLOSE_SQUARE); const closeParens = squareParts[squareParts.length - 1]; const pops = closeParens @@ -115,7 +153,7 @@ function getNumberOfLevelsResolved(line) { return Math.max(levels, 0); } -function accumulateTreeLevel(dfsNodes) { +function accumulateTreeLevel(dfsNodes: AstNodeContext[]): AstNode[] { if (dfsNodes.length === 0) { return []; } @@ -149,7 +187,7 @@ function accumulateTreeLevel(dfsNodes) { return addWhitespaceNodes(levelNodes); } -export function createAst(parsed, source) { +export function createAst(parsed: string, source: string): AstNode { const parsedLines = parsed.split(NEWLINE); const cumulativeCharsByLine = getCumulativeCharsByLine(source); const dfsNodes = []; diff --git a/src/converter/plainRenderer.js b/src/converter/plainRenderer.js deleted file mode 100644 index 5dfd2ad..0000000 --- a/src/converter/plainRenderer.js +++ /dev/null @@ -1,12 +0,0 @@ -export function renderNode(node, rendererMap) { - if (node.children.length > 0) { - return node.children.map((c) => renderNode(c, rendererMap)).join(""); - } - - const render = rendererMap[node.name]; - if (render) { - return render(node); - } - - return node.source; -} diff --git a/src/converter/renderer.ts b/src/converter/renderer.ts index 3860914..afef06f 100644 --- a/src/converter/renderer.ts +++ b/src/converter/renderer.ts @@ -1,8 +1,4 @@ -export type AstNode = { - name: string; - source: string; - children: AstNode[]; -}; +import { AstNode } from "./createAst"; export type RenderFn = (node: AstNode) => string; @@ -10,10 +6,15 @@ export type RendererMap = { [key: string]: RenderFn; }; -export function renderRoot(root: AstNode, rendererMap: RendererMap): string { - const render = rendererMap[root.name]; - if (!render) { - throw new Error(`No renderer found for node: ${root.name}`); +export function renderNode(node: AstNode, rendererMap: RendererMap): string { + if (node.children.length > 0) { + return node.children.map((c) => renderNode(c, rendererMap)).join(""); + } + + const render = rendererMap[node.name]; + if (render) { + return render(node); } - return render(root); + + return node.source; } diff --git a/src/renderers/zql/renderer.d.ts b/src/renderers/zql/renderer.d.ts new file mode 100644 index 0000000..bb83f63 --- /dev/null +++ b/src/renderers/zql/renderer.d.ts @@ -0,0 +1,5 @@ +import { RendererMap } from "../../converter/renderer"; + +declare const zqlRenderer: RendererMap; + +export default zqlRenderer; diff --git a/src/scripts/plainRender.js b/src/scripts/plainRender.js deleted file mode 100644 index bb03c47..0000000 --- a/src/scripts/plainRender.js +++ /dev/null @@ -1,21 +0,0 @@ -// import { renderRoot } from "../plainRenderer"; -// import baseSqlRenderer from "../../renderers/basesql/renderer"; -import { createAst } from "../converter/createAst.js"; -import { renderNode } from "../converter/plainRenderer.js"; -import zqlRenderer from "../renderers/zql/renderer.js"; -import fs from "fs"; - -const argv = { - parsed: "asts/select_from.ast", - source: "examples/select_from.sql", - ast: "asts/select_from.json", - out: "zqlout/select_from.zql", -}; - -const parsed = fs.readFileSync(argv.parsed).toString(); -const source = fs.readFileSync(argv.source).toString(); -const root = createAst(parsed, source); -fs.writeFileSync(argv.ast, JSON.stringify(root, undefined, 2)); - -const zql = renderNode(root, zqlRenderer); -fs.writeFileSync(argv.out, zql); diff --git a/src/scripts/render.ts b/src/scripts/render.ts index 43644f2..b1f1ad7 100644 --- a/src/scripts/render.ts +++ b/src/scripts/render.ts @@ -1,19 +1,19 @@ -// import { renderRoot } from "../renderer"; -// import baseSqlRenderer from "../../renderers/basesql/renderer"; -// import yargs from "yargs"; -// import fs from "fs"; +import { createAst } from "../converter/createAst"; +import { renderNode } from "../converter/renderer"; +import zqlRenderer from "../renderers/zql/renderer"; +import * as fs from "fs"; -// const argv = yargs -// .option("source", { -// type: "string", -// demandOption: true, -// }) -// .option("renderer", { -// type: "string", -// default: "basesql", -// }) -// .help().argv; +const argv = { + parsed: "./asts/select_from.ast", + source: "./examples/select_from.sql", + ast: "./asts/select_from.json", + out: "./zqlout/select_from.zql", +}; -// const sourceContents = fs.readFileSync(argv.source); +const parsed = fs.readFileSync(argv.parsed).toString(); +const source = fs.readFileSync(argv.source).toString(); +const root = createAst(parsed, source); +fs.writeFileSync(argv.ast, JSON.stringify(root, undefined, 2)); -// console.log(sourceContents); +const zql = renderNode(root, zqlRenderer); +fs.writeFileSync(argv.out, zql); diff --git a/yarn.lock b/yarn.lock index aeeb44c..48411df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -268,116 +268,236 @@ resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz#c7184a326533fcdf1b8ee0733e21c713b975575f" integrity sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ== +"@esbuild/aix-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz#51299374de171dbd80bb7d838e1cfce9af36f353" + integrity sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ== + "@esbuild/android-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz#09d9b4357780da9ea3a7dfb833a1f1ff439b4052" integrity sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A== +"@esbuild/android-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz#58565291a1fe548638adb9c584237449e5e14018" + integrity sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw== + "@esbuild/android-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz#9b04384fb771926dfa6d7ad04324ecb2ab9b2e28" integrity sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg== +"@esbuild/android-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.23.1.tgz#5eb8c652d4c82a2421e3395b808e6d9c42c862ee" + integrity sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ== + "@esbuild/android-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz#29918ec2db754cedcb6c1b04de8cd6547af6461e" integrity sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA== +"@esbuild/android-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.23.1.tgz#ae19d665d2f06f0f48a6ac9a224b3f672e65d517" + integrity sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg== + "@esbuild/darwin-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz#e495b539660e51690f3928af50a76fb0a6ccff2a" integrity sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ== +"@esbuild/darwin-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz#05b17f91a87e557b468a9c75e9d85ab10c121b16" + integrity sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q== + "@esbuild/darwin-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz#c13838fa57372839abdddc91d71542ceea2e1e22" integrity sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw== +"@esbuild/darwin-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz#c58353b982f4e04f0d022284b8ba2733f5ff0931" + integrity sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw== + "@esbuild/freebsd-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz#646b989aa20bf89fd071dd5dbfad69a3542e550e" integrity sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g== +"@esbuild/freebsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz#f9220dc65f80f03635e1ef96cfad5da1f446f3bc" + integrity sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA== + "@esbuild/freebsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz#aa615cfc80af954d3458906e38ca22c18cf5c261" integrity sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ== +"@esbuild/freebsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz#69bd8511fa013b59f0226d1609ac43f7ce489730" + integrity sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g== + "@esbuild/linux-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz#70ac6fa14f5cb7e1f7f887bcffb680ad09922b5b" integrity sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q== +"@esbuild/linux-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz#8050af6d51ddb388c75653ef9871f5ccd8f12383" + integrity sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g== + "@esbuild/linux-arm@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz#fc6fd11a8aca56c1f6f3894f2bea0479f8f626b9" integrity sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA== +"@esbuild/linux-arm@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz#ecaabd1c23b701070484990db9a82f382f99e771" + integrity sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ== + "@esbuild/linux-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz#3271f53b3f93e3d093d518d1649d6d68d346ede2" integrity sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg== +"@esbuild/linux-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz#3ed2273214178109741c09bd0687098a0243b333" + integrity sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ== + "@esbuild/linux-loong64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz#ed62e04238c57026aea831c5a130b73c0f9f26df" integrity sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg== +"@esbuild/linux-loong64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz#a0fdf440b5485c81b0fbb316b08933d217f5d3ac" + integrity sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw== + "@esbuild/linux-mips64el@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz#e79b8eb48bf3b106fadec1ac8240fb97b4e64cbe" integrity sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg== +"@esbuild/linux-mips64el@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz#e11a2806346db8375b18f5e104c5a9d4e81807f6" + integrity sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q== + "@esbuild/linux-ppc64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz#5f2203860a143b9919d383ef7573521fb154c3e4" integrity sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w== +"@esbuild/linux-ppc64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz#06a2744c5eaf562b1a90937855b4d6cf7c75ec96" + integrity sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw== + "@esbuild/linux-riscv64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz#07bcafd99322d5af62f618cb9e6a9b7f4bb825dc" integrity sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA== +"@esbuild/linux-riscv64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz#65b46a2892fc0d1af4ba342af3fe0fa4a8fe08e7" + integrity sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA== + "@esbuild/linux-s390x@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz#b7ccf686751d6a3e44b8627ababc8be3ef62d8de" integrity sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A== +"@esbuild/linux-s390x@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz#e71ea18c70c3f604e241d16e4e5ab193a9785d6f" + integrity sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw== + "@esbuild/linux-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz#6d8f0c768e070e64309af8004bb94e68ab2bb3b0" integrity sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ== +"@esbuild/linux-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz#d47f97391e80690d4dfe811a2e7d6927ad9eed24" + integrity sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ== + "@esbuild/netbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz#bbe430f60d378ecb88decb219c602667387a6047" integrity sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg== +"@esbuild/netbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz#44e743c9778d57a8ace4b72f3c6b839a3b74a653" + integrity sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA== + +"@esbuild/openbsd-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz#05c5a1faf67b9881834758c69f3e51b7dee015d7" + integrity sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q== + "@esbuild/openbsd-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz#99d1cf2937279560d2104821f5ccce220cb2af70" integrity sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow== +"@esbuild/openbsd-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz#2e58ae511bacf67d19f9f2dcd9e8c5a93f00c273" + integrity sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA== + "@esbuild/sunos-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz#08741512c10d529566baba837b4fe052c8f3487b" integrity sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg== +"@esbuild/sunos-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz#adb022b959d18d3389ac70769cef5a03d3abd403" + integrity sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA== + "@esbuild/win32-arm64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz#675b7385398411240735016144ab2e99a60fc75d" integrity sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A== +"@esbuild/win32-arm64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz#84906f50c212b72ec360f48461d43202f4c8b9a2" + integrity sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A== + "@esbuild/win32-ia32@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz#1bfc3ce98aa6ca9a0969e4d2af72144c59c1193b" integrity sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA== +"@esbuild/win32-ia32@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz#5e3eacc515820ff729e90d0cb463183128e82fac" + integrity sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ== + "@esbuild/win32-x64@0.21.5": version "0.21.5" resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz#acad351d582d157bb145535db2a6ff53dd514b5c" integrity sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw== +"@esbuild/win32-x64@0.23.1": + version "0.23.1" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz#81fd50d11e2c32b2d6241470e3185b70c7b30699" + integrity sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg== + "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.1" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" @@ -725,6 +845,18 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.33": + version "17.0.33" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + "@typescript-eslint/eslint-plugin@8.14.0": version "8.14.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.14.0.tgz#7dc0e419c87beadc8f554bf5a42e5009ed3748dc" @@ -1196,6 +1328,36 @@ esbuild@^0.21.3: "@esbuild/win32-ia32" "0.21.5" "@esbuild/win32-x64" "0.21.5" +esbuild@~0.23.0: + version "0.23.1" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.23.1.tgz#40fdc3f9265ec0beae6f59824ade1bd3d3d2dab8" + integrity sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.23.1" + "@esbuild/android-arm" "0.23.1" + "@esbuild/android-arm64" "0.23.1" + "@esbuild/android-x64" "0.23.1" + "@esbuild/darwin-arm64" "0.23.1" + "@esbuild/darwin-x64" "0.23.1" + "@esbuild/freebsd-arm64" "0.23.1" + "@esbuild/freebsd-x64" "0.23.1" + "@esbuild/linux-arm" "0.23.1" + "@esbuild/linux-arm64" "0.23.1" + "@esbuild/linux-ia32" "0.23.1" + "@esbuild/linux-loong64" "0.23.1" + "@esbuild/linux-mips64el" "0.23.1" + "@esbuild/linux-ppc64" "0.23.1" + "@esbuild/linux-riscv64" "0.23.1" + "@esbuild/linux-s390x" "0.23.1" + "@esbuild/linux-x64" "0.23.1" + "@esbuild/netbsd-x64" "0.23.1" + "@esbuild/openbsd-arm64" "0.23.1" + "@esbuild/openbsd-x64" "0.23.1" + "@esbuild/sunos-x64" "0.23.1" + "@esbuild/win32-arm64" "0.23.1" + "@esbuild/win32-ia32" "0.23.1" + "@esbuild/win32-x64" "0.23.1" + escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" @@ -1416,6 +1578,13 @@ get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-tsconfig@^4.7.5: + version "4.8.1" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.8.1.tgz#8995eb391ae6e1638d251118c7b56de7eb425471" + integrity sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg== + dependencies: + resolve-pkg-maps "^1.0.0" + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1877,6 +2046,11 @@ resolve-from@^4.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" @@ -2078,6 +2252,16 @@ tslib@^2.6.2, tslib@^2.8.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== +tsx@^4.19.2: + version "4.19.2" + resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.2.tgz#2d7814783440e0ae42354d0417d9c2989a2ae92c" + integrity sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g== + dependencies: + esbuild "~0.23.0" + get-tsconfig "^4.7.5" + optionalDependencies: + fsevents "~2.3.3" + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"