Open simonw opened 4 years ago
pyparsing has an example based on SQLite SELECT statements: https://github.com/pyparsing/pyparsing/blob/8d9ab59a2b2767ad56c9b852c325075113718c0a/examples/select_parser.py
https://github.com/lark-parser/lark is a relatively new (less than two years old) parsing library that looks promising too.
254 and #653 are both examples of problems that could be solved using a real SQL parser in Python.