go-tree-sitter icon indicating copy to clipboard operation
go-tree-sitter copied to clipboard

SQLite grammar?

Open StevenACoffman opened this issue 4 years ago • 2 comments

👋 Hi, This go binding is pretty great! I would love to be able to use this for SQL, specifically SQLite (and possibly PostgreSQL). I've found https://github.com/dhcmrlchtdj/tree-sitter-sqlite but that's in javascript, and I'm not really sure where to start gluing bits and pieces together.

StevenACoffman avatar Dec 15 '21 14:12 StevenACoffman

Hi @StevenACoffman !

I'm a bit reluctant to merge this grammar into master at this point, but here you can see how to integrate the grammar: https://github.com/smacker/go-tree-sitter/pull/58

Files sqlite/parser.c and sqlite/parser.h are automatically copied from https://github.com/dhcmrlchtdj/tree-sitter-sqlite by running bash vendor.sh download sqlite. Only a tiny binding.go file is required to be created manually.

You can publish it in your fork or in a separate package and import in your code from there. It doesn't have to be located in smacker/go-tree-sitte.

smacker avatar Jan 10 '22 10:01 smacker

so basically all parsers "integrated" into this package are just stolen from other packages, and there's no info on how they were generated? Do I understand this correctly?

metalim avatar Aug 23 '23 05:08 metalim