Switch to compiling YAML patterns to Python AST