class XPathParser {

    protected OrderBy parseOrderBy( TokenStream tokens ) {
        if (tokens.canConsume("order", "by")) {
            List<OrderBySpec> specs = new ArrayList<OrderBySpec>();
            do {
                OrderBySpec spec = parseOrderBySpec(tokens);
                specs.add(spec);
            } while (tokens.canConsume(','));
            if (!specs.isEmpty()) return new OrderBy(specs);
        }
        return null;
    }

    public  XPathParser( TypeSystem context );

}