I got an idea for an agnostic representation of SQL statements as S-expressions that doesn't depend on the particular syntax of the SQL dialect it is going to be translated into.  All it needs to know is the lexical syntax of SQL identifiers and strings, and the fact that sequences may be comma-separated with or without parentheses and may be space-separated, with a convention for representing the three types using lists (comma-separated with parens), vectors (space-separated), and vectors whose sole element is a list (comma-separated without parens).

See https://bitbucket.org/cowan/r7rs-wg1-infra/src/default/AgnosticSql.md for details.



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
As we all know, civil libertarians are not the friskiest group around --
comes from  forever being on the qui vive for the sound of jack-booted
fascism coming down the pike.           --Molly Ivins