DerekStride/tree-sitter-sql


SQL grammar for tree-sitter

http://derek.stride.host/tree-sitter-sql/

License: MIT

Language: JavaScript

Keywords: sql, tree-sitter, tree-sitter-parser


tree-sitter-sql

Build/test GitHub Pages npm package version

A general/permissive SQL grammar for tree-sitter.

Installation

We don't commit the generated parser files to the main branch. Instead, you can find them on the gh-pages branch. We're open to feedback & encourage you to open an issue to discuss any problems.

They are also hosted on the GitHub pages site and available for download here: github://derekstride/tree-sitter-sql/gh-pages.tar.gz.

Plugin maintainers ensure to specify the HEAD (or a specific revision) of the gh-pages branch when integrating with this project.

Step 1: Download the parser files

Using git

git clone https://github.com/DerekStride/tree-sitter-sql.git
cd tree-sitter-sql
git checkout gh-pages

Using curl

curl -LO https://github.com/DerekStride/tree-sitter-sql/archive/refs/heads/gh-pages.tar.gz
tar -xzf gh-pages.tar.gz
cd tree-sitter-sql-gh-pages

Step 2: Compile the Parser

Tree-sitter parsers need to be compiled as a shared-object / dynamic-library, you can enable this by passing the -shared & -fPIC flags to your compiler.

cc -shared -fPIC -I./src src/parser.c src/scanner.c -o sql.so

Using cargo

cargo add tree-sitter-sequel

Using npm

npm i @derekstride/tree-sitter-sql

Using pip

pip install tree-sitter-sql

Development

See CONTRIBUTING.md for documentation on how to set up the project for development.

Features

For a complete list of features see the the tests

References

Other projects

Project Statistics

Sourcerank 7
Repository Size 42.4 MB
Stars 147
Forks 46
Watchers 6
Open issues 17
Dependencies 8
Contributors 21
Tags 8
Created
Last updated
Last pushed

Top Contributors See all

Derek Stride Matthias Q Dian Fay antoineB LeoniePhiline DS/Charlie John W Higgins Gilberto Ribeiro Trey Wood eklmv David McDonald Kristijan Husak Guilherme Soares bombardier200 Junyi Herrington Darkholme James Owen blinxen abal Trevor Clarke

Packages Referencing this Repo

tree-sitter-sequel
sql grammar for the tree-sitter parsing library
Latest release 0.3.3 - Updated - 147 stars
@derekstride/tree-sitter-sql
Tree-sitter Grammar for SQL
Latest release 0.3.5 - Updated - 147 stars

Recent Tags See all

v0.3.5 August 09, 2024
v0.3.4 August 08, 2024
v0.3.3 July 30, 2024
v0.3.2 July 25, 2024
v0.3.0 April 20, 2024
v0.2.0 December 15, 2023
v0.1.1 November 22, 2023
v0.1.0 November 17, 2023

Something wrong with this page? Make a suggestion

Last synced: 2024-08-09 21:09:34 UTC

Login to resync this repository