Add generator expressions that combine and use boolean test results:
$<0:...> = empty string (ignores "...")
$<1:...> = content of "..."
$<AND:?[,?]...> = '1' if all '?' are '1', else '0'
$<OR:?[,?]...> = '0' if all '?' are '0', else '1'
$<NOT:?> = '0' if '?' is '1', else '1'
These will be useful to evaluate (future) boolean query expressions and
condition content on the results. Include tests and documentation.