def create_selection():
operation = Forward()<EOL>nested = Group(Suppress("<STR_LIT:(>") + operation + Suppress("<STR_LIT:)>")).setResultsName("<STR_LIT>")<EOL>select_expr = Forward()<EOL>functions = select_functions(select_expr)<EOL>maybe_nested = functions | nested | Group(var_val)<EOL>operation <<= maybe_nested + OneOrMore(oneOf("<STR_LIT>") + maybe_nested)<EOL>select_expr <<= operation | maybe_nested<EOL>alias = Group(Suppress(upkey("<STR_LIT>")) + var).setResultsName("<STR_LIT>")<EOL>full_select = Group(<EOL>Group(select_expr).setResultsName("<STR_LIT>") + Optional(alias)<EOL>)<EOL>return Group(<EOL>Keyword("<STR_LIT:*>") | upkey("<STR_LIT>") | delimitedList(full_select)<EOL>).setResultsName("<STR_LIT>")<EOL>
Create a selection expression