Simple XPath AST generator