Minor refactoring to reduce the diff with the XQuery grammar.