-// $Id: CQLParser.java,v 1.37 2007-07-03 13:34:30 mike Exp $
+// $Id: CQLParser.java,v 1.39 2007-08-06 15:54:48 mike Exp $
package org.z3950.zing.cql;
import java.io.IOException;
/**
* Compiles CQL strings into parse trees of CQLNode subtypes.
*
- * @version $Id: CQLParser.java,v 1.37 2007-07-03 13:34:30 mike Exp $
+ * @version $Id: CQLParser.java,v 1.39 2007-08-06 15:54:48 mike Exp $
* @see <A href="http://zing.z3950.org/cql/index.html"
* >http://zing.z3950.org/cql/index.html</A>
*/
* </li>
* </ul>
*/
- CQLParser(int compat) {
+ public CQLParser(int compat) {
this.compat = compat;
}
/**
* The new parser implements CQL 1.2
*/
- CQLParser() {
+ public CQLParser() {
this.compat = V1POINT2;
}
ModifierSet ms = gatherModifiers(sortindex);
sortnode.addSortIndex(ms);
}
+
+ if (sortnode.keys.size() == 0) {
+ throw new CQLParseException("no sort keys");
+ }
+
node = sortnode;
}