4 ms·
Direct image link: https://gist.githubusercontent.com/nomsolence/69bc0b5fe1ba943d82cd37fdbd23df6d/raw/87abcc0805f0a0b3456707792a78fa763db20110/db.png https://gi
by kohtatsu 7y ago
Direct image link: https://gist.githubusercontent.com/nomsolence/69bc0b5fe1ba943d82cd37fdbd23df6d/raw/87abcc0805f0a0b3456707792a78fa763db20110/db.png https://gist.githubusercontent.com/nomsolence/69bc0b5fe1ba94...
Not shown is the second stage of AST; it resolves types for the SQL dialect, e.g. "bool" to "BOOLEAN" for SQLite (all caps for convention of course), as well as things like the special "ROWID" type for SQLite, and finding types for "FK" columns, adding the constraints declarations, and finally validation!
Maybe the first AST is an IR? I'll read the compiler design book and find out.