Scala example for parsing XML into AST, transforming that AST to boolean expression, and generate that expression in postfix notation