&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
/** * Count the number of predicates in the step. * * @param opPos The position of the first predicate the m_opMap array. * * @return The number of predicates for this step. * * @throws TransformerException if a error occurs creating the Expression. */ public int countPredicates(int opPos) throws TransformerException { int count = 0; while (OpCodes.OP_PREDICATE == getOp(opPos)) { count++; opPos = getNextOpPos(opPos); } return count; }
/** * Count the number of predicates in the step. * * @param opPos The position of the first predicate the m_opMap array. * * @return The number of predicates for this step. * * @throws TransformerException if a error occurs creating the Expression. */ public int countPredicates(int opPos) throws TransformerException { int count = 0; while (OpCodes.OP_PREDICATE == getOp(opPos)) { count++; opPos = getNextOpPos(opPos); } return count; }
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
&& (stepType <= OpCodes.AXES_END_TYPES)) return getNextOpPos(opPos); int newOpPos = getNextOpPos(opPos); newOpPos = getNextOpPos(newOpPos);
/** * Compiles predicates in the step. * * @param opPos The position of the first predicate the m_opMap array. * @param predicates An empty pre-determined array of * {@link org.apache.xpath.Expression}s, that will be filled in. * * @throws TransformerException */ private void compilePredicates(int opPos, Expression[] predicates) throws TransformerException { for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++) { predicates[i] = predicate(opPos); opPos = getNextOpPos(opPos); } }
/** * Compiles predicates in the step. * * @param opPos The position of the first predicate the m_opMap array. * @param predicates An empty pre-determined array of * {@link org.apache.xpath.Expression}s, that will be filled in. * * @throws TransformerException */ private void compilePredicates(int opPos, Expression[] predicates) throws TransformerException { for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++) { predicates[i] = predicate(opPos); opPos = getNextOpPos(opPos); } }
nextOpPos = getNextOpPos(nextOpPos); nextOpPos = getNextOpPos(opPos); patterns[i] = (StepPattern) compile(opPos); opPos = nextOpPos;
/** * Bottle-neck compilation of an operation with left and right operands. * * @param operation non-null reference to parent operation. * @param opPos The op map position of the parent operation. * * @return reference to {@link org.apache.xpath.operations.Operation} instance. * * @throws TransformerException if there is a syntax or other error. */ private Expression compileOperation(Operation operation, int opPos) throws TransformerException { int leftPos = getFirstChildPos(opPos); int rightPos = getNextOpPos(leftPos); operation.setLeftRight(compile(leftPos), compile(rightPos)); return operation; }
/** * Bottle-neck compilation of an operation with left and right operands. * * @param operation non-null reference to parent operation. * @param opPos The op map position of the parent operation. * * @return reference to {@link org.apache.xpath.operations.Operation} instance. * * @throws TransformerException if there is a syntax or other error. */ private Expression compileOperation(Operation operation, int opPos) throws TransformerException { int leftPos = getFirstChildPos(opPos); int rightPos = getNextOpPos(leftPos); operation.setLeftRight(compile(leftPos), compile(rightPos)); return operation; }
static boolean functionProximateOrContainsProximate(Compiler compiler, int opPos) { int endFunc = opPos + compiler.getOp(opPos + 1) - 1; opPos = OpMap.getFirstChildPos(opPos); int funcID = compiler.getOp(opPos); // System.out.println("funcID: "+funcID); // System.out.println("opPos: "+opPos); // System.out.println("endFunc: "+endFunc); switch(funcID) { case FunctionTable.FUNC_LAST: case FunctionTable.FUNC_POSITION: return true; default: opPos++; int i = 0; for (int p = opPos; p < endFunc; p = compiler.getNextOpPos(p), i++) { int innerExprOpPos = p+2; int argOp = compiler.getOp(innerExprOpPos); boolean prox = isProximateInnerExpr(compiler, innerExprOpPos); if(prox) return true; } } return false; }
static boolean functionProximateOrContainsProximate(Compiler compiler, int opPos) { int endFunc = opPos + compiler.getOp(opPos + 1) - 1; opPos = OpMap.getFirstChildPos(opPos); int funcID = compiler.getOp(opPos); // System.out.println("funcID: "+funcID); // System.out.println("opPos: "+opPos); // System.out.println("endFunc: "+endFunc); switch(funcID) { case FunctionTable.FUNC_LAST: case FunctionTable.FUNC_POSITION: return true; default: opPos++; int i = 0; for (int p = opPos; p < endFunc; p = compiler.getNextOpPos(p), i++) { int innerExprOpPos = p+2; int argOp = compiler.getOp(innerExprOpPos); boolean prox = isProximateInnerExpr(compiler, innerExprOpPos); if(prox) return true; } } return false; }
loadLocationPaths(compiler, compiler.getNextOpPos(opPos), count + 1); case OpCodes.OP_FUNCTION : case OpCodes.OP_GROUP : loadLocationPaths(compiler, compiler.getNextOpPos(opPos), count + 1);