def create_where():
conjunction = Forward().setResultsName("<STR_LIT>")<EOL>nested = Group(Suppress("<STR_LIT:(>") + conjunction + Suppress("<STR_LIT:)>")).setResultsName(<EOL>"<STR_LIT>"<EOL>)<EOL>maybe_nested = nested | constraint<EOL>inverted = Group(not_ + maybe_nested).setResultsName("<STR_LIT>")<EOL>full_constraint = maybe_nested | inverted<EOL>conjunction <<= full_constraint + OneOrMore(and_or + full_constraint)<EOL>return upkey("<STR_LIT>") + Group(conjunction | full_constraint).setResultsName("<STR_LIT>")<EOL>
Create a grammar for the 'where' clause used by 'select