How do you write nested and recursive NimbleParsec parsers?

Since there are ABNF grammars for SQL around, you might also look at ex_abnf