+ private CQLNode parseTopLevelPrefixes(String index, CQLRelation relation)
+ throws CQLParseException, IOException {
+ debug("top-level prefix mapping");
+
+ if (lexer.ttype == '>') {
+ return parsePrefix(index, relation, true);
+ }
+
+ CQLNode node = parseQuery(index, relation);
+ if ((compat == V1POINT2 || compat == V1POINT1SORT) &&
+ lexer.ttype == lexer.TT_SORTBY) {
+ match(lexer.ttype);
+ debug("sortspec");
+
+ CQLSortNode sortnode = new CQLSortNode(node);
+ while (lexer.ttype != lexer.TT_EOF) {
+ String sortindex = matchSymbol("sort index");
+ ModifierSet ms = gatherModifiers(sortindex);
+ sortnode.addSortIndex(ms);
+ }
+ node = sortnode;
+ }
+
+ return node;
+ }
+