[WARN]https://github.com/steveyen/sqld3 seems just a toy, so do not use both projects of us.
This project is a SQL parser based on PEG(parsing expression grammar).
And the sql.pegjs file is modified from https://github.com/steveyen/sqld3.
Thanks for the effort of @steveyen.
varparser=require('sql.pegjs');varsql='select * from users;';parser.parse(sql)// => [{"stmt":"select","select_cores":[{"results":[{"column":"*"}],"from":[{"table":"users"}]}]}]);modify
lib/sql.pegjsand add tests.run
make buildthen run
make test
MIT