Cleaned up XPath lexer boilerplate a bit.