2 ms·
When I refer to "extracting sources from the SQLite codebase" a big part of that was indeed referring to compiling Lemon and executing it against a custom imple
by lalitmaganti 7mo ago
When I refer to "extracting sources from the SQLite codebase" a big part of that was indeed referring to compiling Lemon and executing it against a custom implementation of parse.y [1].
The problem comes from how SQLite's upstream parse.y works. Becuase it doesn't actually generate the parse tree, instead generating the bytecode directly, the intepretation of any node labelled "id" or "nm" is buried inside the source code behind many layers of functions. You can see for yourself by looking at SQLite's parse.y [2]
[1] https://github.com/LalitMaganti/syntaqlite/tree/main/syntaqlite-buildtools/parser-actions https://github.com/LalitMaganti/syntaqlite/tree/main/syntaql...
[2] https://sqlite.org/src/file?name=src/parse.y&ci=trunk https://sqlite.org/src/file?name=src/parse.y&ci=trunk
- zellyn 6mo agoAh, that makes sense. Thanks for the details. I see now that your article basically had all the information I needed to figure this out if I’d thought a bit harder! Also, nice work: this makes the world just a little nicer!