Lines Matching defs:opPos

108    * @param opPos The current position in the xpath.m_opMap array.
114 public Expression compile(int opPos) throws TransformerException
117 int op = getOp(opPos);
124 expr = compile(opPos + 2); break;
126 expr = or(opPos); break;
128 expr = and(opPos); break;
130 expr = notequals(opPos); break;
132 expr = equals(opPos); break;
134 expr = lte(opPos); break;
136 expr = lt(opPos); break;
138 expr = gte(opPos); break;
140 expr = gt(opPos); break;
142 expr = plus(opPos); break;
144 expr = minus(opPos); break;
146 expr = mult(opPos); break;
148 expr = div(opPos); break;
150 expr = mod(opPos); break;
152 // expr = quo(opPos); break;
154 expr = neg(opPos); break;
156 expr = string(opPos); break;
158 expr = bool(opPos); break;
160 expr = number(opPos); break;
162 expr = union(opPos); break;
164 expr = literal(opPos); break;
166 expr = variable(opPos); break;
168 expr = group(opPos); break;
170 expr = numberlit(opPos); break;
172 expr = arg(opPos); break;
174 expr = compileExtension(opPos); break;
176 expr = compileFunction(opPos); break;
178 expr = locationPath(opPos); break;
182 expr = matchPattern(opPos + 2); break;
184 expr = locationPathPattern(opPos); break;
187 new Object[]{ "quo" }); //"ERROR! Unknown op code: "+m_opMap[opPos]);
191 new Object[]{ Integer.toString(getOp(opPos)) }); //"ERROR! Unknown op code: "+m_opMap[opPos]);
203 * @param opPos The op map position of the parent operation.
209 private Expression compileOperation(Operation operation, int opPos)
213 int leftPos = getFirstChildPos(opPos);
225 * @param opPos The position in the op map of the parent operation.
231 private Expression compileUnary(UnaryOperation unary, int opPos)
235 int rightPos = getFirstChildPos(opPos);
245 * @param opPos The current position in the m_opMap array.
251 protected Expression or(int opPos) throws TransformerException
253 return compileOperation(new Or(), opPos);
259 * @param opPos The current position in the m_opMap array.
265 protected Expression and(int opPos) throws TransformerException
267 return compileOperation(new And(), opPos);
273 * @param opPos The current position in the m_opMap array.
279 protected Expression notequals(int opPos) throws TransformerException
281 return compileOperation(new NotEquals(), opPos);
287 * @param opPos The current position in the m_opMap array.
293 protected Expression equals(int opPos) throws TransformerException
295 return compileOperation(new Equals(), opPos);
301 * @param opPos The current position in the m_opMap array.
307 protected Expression lte(int opPos) throws TransformerException
309 return compileOperation(new Lte(), opPos);
315 * @param opPos The current position in the m_opMap array.
321 protected Expression lt(int opPos) throws TransformerException
323 return compileOperation(new Lt(), opPos);
329 * @param opPos The current position in the m_opMap array.
335 protected Expression gte(int opPos) throws TransformerException
337 return compileOperation(new Gte(), opPos);
343 * @param opPos The current position in the m_opMap array.
349 protected Expression gt(int opPos) throws TransformerException
351 return compileOperation(new Gt(), opPos);
357 * @param opPos The current position in the m_opMap array.
363 protected Expression plus(int opPos) throws TransformerException
365 return compileOperation(new Plus(), opPos);
371 * @param opPos The current position in the m_opMap array.
377 protected Expression minus(int opPos) throws TransformerException
379 return compileOperation(new Minus(), opPos);
385 * @param opPos The current position in the m_opMap array.
391 protected Expression mult(int opPos) throws TransformerException
393 return compileOperation(new Mult(), opPos);
399 * @param opPos The current position in the m_opMap array.
405 protected Expression div(int opPos) throws TransformerException
407 return compileOperation(new Div(), opPos);
413 * @param opPos The current position in the m_opMap array.
419 protected Expression mod(int opPos) throws TransformerException
421 return compileOperation(new Mod(), opPos);
427 * @param opPos The current position in the m_opMap array.
433 // protected Expression quo(int opPos) throws TransformerException
435 // return compileOperation(new Quo(), opPos);
441 * @param opPos The current position in the m_opMap array.
447 protected Expression neg(int opPos) throws TransformerException
449 return compileUnary(new Neg(), opPos);
455 * @param opPos The current position in the m_opMap array.
461 protected Expression string(int opPos) throws TransformerException
463 return compileUnary(new org.apache.xpath.operations.String(), opPos);
469 * @param opPos The current position in the m_opMap array.
475 protected Expression bool(int opPos) throws TransformerException
477 return compileUnary(new org.apache.xpath.operations.Bool(), opPos);
483 * @param opPos The current position in the m_opMap array.
489 protected Expression number(int opPos) throws TransformerException
491 return compileUnary(new org.apache.xpath.operations.Number(), opPos);
497 * @param opPos The current position in the m_opMap array.
503 protected Expression literal(int opPos)
506 opPos = getFirstChildPos(opPos);
508 return (XString) getTokenQueue().elementAt(getOp(opPos));
514 * @param opPos The current position in the m_opMap array.
520 protected Expression numberlit(int opPos)
523 opPos = getFirstChildPos(opPos);
525 return (XNumber) getTokenQueue().elementAt(getOp(opPos));
531 * @param opPos The current position in the m_opMap array.
537 protected Expression variable(int opPos) throws TransformerException
542 opPos = getFirstChildPos(opPos);
544 int nsPos = getOp(opPos);
549 = (java.lang.String) getTokenQueue().elementAt(getOp(opPos+1));
560 * @param opPos The current position in the m_opMap array.
566 protected Expression group(int opPos) throws TransformerException
570 return compile(opPos + 2);
576 * @param opPos The current position in the m_opMap array.
582 protected Expression arg(int opPos) throws TransformerException
586 return compile(opPos + 2);
593 * @param opPos The current position in the m_opMap array.
599 protected Expression union(int opPos) throws TransformerException
604 return UnionPathIterator.createUnionIterator(this, opPos);
635 * @param opPos The current position in the m_opMap array.
641 public Expression locationPath(int opPos) throws TransformerException
646 DTMIterator iter = WalkerFactory.newDTMIterator(this, opPos, (locPathDepth == 0));
658 * @param opPos The current position in the m_opMap array.
664 public Expression predicate(int opPos) throws TransformerException
666 return compile(opPos + 2);
672 * @param opPos The current position in the m_opMap array.
678 protected Expression matchPattern(int opPos) throws TransformerException
684 int nextOpPos = opPos;
693 return compile(opPos);
698 for (i = 0; getOp(opPos) == OpCodes.OP_LOCATIONPATHPATTERN; i++)
700 nextOpPos = getNextOpPos(opPos);
701 patterns[i] = (StepPattern) compile(opPos);
702 opPos = nextOpPos;
718 * @param opPos The current position in the m_opMap array.
724 public Expression locationPathPattern(int opPos)
728 opPos = getFirstChildPos(opPos);
730 return stepPattern(opPos, 0, null);
737 * @param opPos the op map position for the location step.
742 public int getWhatToShow(int opPos)
745 int axesType = getOp(opPos);
746 int testType = getOp(opPos + 3);
813 * @param opPos The current position in the m_opMap array.
822 int opPos, int stepCount, StepPattern ancestorPattern)
826 int startOpPos = opPos;
827 int stepType = getOp(opPos);
836 int endStep = getNextOpPos(opPos);
850 argLen = getOp(opPos + OpMap.MAPINDEX_LENGTH);
851 pattern = new FunctionPattern(compileFunction(opPos), Axis.PARENT, Axis.CHILD);
857 argLen = getArgLengthOfStep(opPos);
858 opPos = getFirstChildPosOfStep(opPos);
866 argLen = getArgLengthOfStep(opPos);
867 opPos = getFirstChildPosOfStep(opPos);
876 argLen = getArgLengthOfStep(opPos);
877 opPos = getFirstChildPosOfStep(opPos);
890 argLen = getArgLengthOfStep(opPos);
891 opPos = getFirstChildPosOfStep(opPos);
903 pattern.setPredicates(getCompiledPredicates(opPos + argLen));
941 * @param opPos The position of the first predicate the m_opMap array.
947 public Expression[] getCompiledPredicates(int opPos)
951 int count = countPredicates(opPos);
957 compilePredicates(opPos, predicates);
968 * @param opPos The position of the first predicate the m_opMap array.
974 public int countPredicates(int opPos) throws TransformerException
979 while (OpCodes.OP_PREDICATE == getOp(opPos))
983 opPos = getNextOpPos(opPos);
992 * @param opPos The position of the first predicate the m_opMap array.
998 private void compilePredicates(int opPos, Expression[] predicates)
1002 for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++)
1004 predicates[i] = predicate(opPos);
1005 opPos = getNextOpPos(opPos);
1012 * @param opPos The current position in the m_opMap array.
1018 Expression compileFunction(int opPos) throws TransformerException
1021 int endFunc = opPos + getOp(opPos + 1) - 1;
1023 opPos = getFirstChildPos(opPos);
1025 int funcID = getOp(opPos);
1027 opPos++;
1047 for (int p = opPos; p < endFunc; p = getNextOpPos(p), i++)
1094 * @param opPos The current position in the m_opMap array.
1100 private Expression compileExtension(int opPos)
1104 int endExtFunc = opPos + getOp(opPos + 1) - 1;
1106 opPos = getFirstChildPos(opPos);
1108 java.lang.String ns = (java.lang.String) getTokenQueue().elementAt(getOp(opPos));
1110 opPos++;
1113 (java.lang.String) getTokenQueue().elementAt(getOp(opPos));
1115 opPos++;
1127 while (opPos < endExtFunc)
1129 int nextOpPos = getNextOpPos(opPos);
1131 extension.setArg(this.compile(opPos), i);
1133 opPos = nextOpPos;