Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
> Where is the SQLite test suite, please?
Here's the scrapped tests:
https://github.com/bkiers/sqlite-parser/tree/master/src/test...
I didn't find a scrapper. I was cobbling together my own scrapper when I stumbled onto these files. My scrapper is turrible.
This SQLite grammar is included in grammars-v4. Looks like a copy vs a fork. I don't know why these tests weren't copied too.
> please don't try and write your own grammar
I must be a masochist.
Aside: Ages ago, during an job interview, when asked to talk about some of my prior work, I mentioned my SQL grammar. The self-described "bar raiser" cut me off, dismissed my effort as trivial, because the grammar generator (ANTLR) does all the work. I had no response.
that is definitely the goal, both a formatter and a linter. we want to add something like squawk directly to the language server, so you get eslint-like dx. with the ast and the database schema in the data model, you can basically add any rule you like.
[0] https://github.com/sbdchd/squawk/tree/master
Where is the SQLite test suite, please? I'd be very interested.
There are already SQL grammars, check https://github.com/antlr/grammars-v4 specifically in here I think https://github.com/antlr/grammars-v4/tree/master/sql I contributed to one of them, and I wrote my own for some personal work. Be warned, it's very involved, very complex and MSSQL is rather ill-defined.
Names bracket identifiers) in SQL are bloody awful. Sometimes square brackets are even compulsory, and why you can usually replace [...] with the SQL standard "..." , not always! Trust me, it gets worse.
I don't find antlr grammars to be brittle, and while they can lose in performance (by how much I don't know, perhaps quite considerably) they are very easy to maintain and I am very fortunate to have antlr to work with.
Sure, still a WIP but it's getting there [1]
[1] https://github.com/superscribe-io/superscribe/blob/developme...