- private void gatherProxRelation(CQLProxNode node)
- throws CQLParseException, IOException {
- if (!isRelation())
- throw new CQLParseException("expected proximity relation, got " +
- lexer.render());
- node.addModifier("relation", null, lexer.render(lexer.ttype, false));
- match(lexer.ttype);
- debug("gPR matched " + lexer.render(lexer.ttype, false));
- }
-
- private void gatherProxDistance(CQLProxNode node)
- throws CQLParseException, IOException {
- if (lexer.ttype != lexer.TT_NUMBER)
- throw new CQLParseException("expected proximity distance, got " +
- lexer.render());
- node.addModifier("distance", null, lexer.render(lexer.ttype, false));
- match(lexer.ttype);
- debug("gPD matched " + lexer.render(lexer.ttype, false));
- }
-
- private void gatherProxUnit(CQLProxNode node)
- throws CQLParseException, IOException {
- if (lexer.ttype != lexer.TT_pWORD &&
- lexer.ttype != lexer.TT_SENTENCE &&
- lexer.ttype != lexer.TT_PARAGRAPH &&
- lexer.ttype != lexer.TT_ELEMENT)
- throw new CQLParseException("expected proximity unit, got " +
- lexer.render());
- node.addModifier("unit", null, lexer.render());
- match(lexer.ttype);
- }
-
- private void gatherProxOrdering(CQLProxNode node)
- throws CQLParseException, IOException {
- if (lexer.ttype != lexer.TT_ORDERED &&
- lexer.ttype != lexer.TT_UNORDERED)
- throw new CQLParseException("expected proximity ordering, got " +
- lexer.render());
- node.addModifier("ordering", null, lexer.render());
- match(lexer.ttype);
- }
-
- // Checks for a relation that may be used inside a prox operator