public Expression compile(int opPos) throws TransformerException {
  int op=getOp(opPos);
  Expression expr=null;
switch (op) {
case OpCodes.OP_XPATH:
    expr=compile(opPos + 2);
  break;
case OpCodes.OP_OR:
expr=or(opPos);
break;
case OpCodes.OP_AND:
expr=and(opPos);
break;
case OpCodes.OP_NOTEQUALS:
expr=notequals(opPos);
break;
case OpCodes.OP_EQUALS:
expr=equals(opPos);
break;
case OpCodes.OP_LTE:
expr=lte(opPos);
break;
case OpCodes.OP_LT:
expr=lt(opPos);
break;
case OpCodes.OP_GTE:
expr=gte(opPos);
break;
case OpCodes.OP_GT:
expr=gt(opPos);
break;
case OpCodes.OP_PLUS:
expr=plus(opPos);
break;
case OpCodes.OP_MINUS:
expr=minus(opPos);
break;
case OpCodes.OP_MULT:
expr=mult(opPos);
break;
case OpCodes.OP_DIV:
expr=div(opPos);
break;
case OpCodes.OP_MOD:
expr=mod(opPos);
break;
case OpCodes.OP_NEG:
expr=neg(opPos);
break;
case OpCodes.OP_STRING:
expr=string(opPos);
break;
case OpCodes.OP_BOOL:
expr=bool(opPos);
break;
case OpCodes.OP_NUMBER:
expr=number(opPos);
break;
case OpCodes.OP_UNION:
expr=union(opPos);
break;
case OpCodes.OP_LITERAL:
expr=literal(opPos);
break;
case OpCodes.OP_VARIABLE:
expr=variable(opPos);
break;
case OpCodes.OP_GROUP:
expr=group(opPos);
break;
case OpCodes.OP_NUMBERLIT:
expr=numberlit(opPos);
break;
case OpCodes.OP_ARGUMENT:
expr=arg(opPos);
break;
case OpCodes.OP_EXTFUNCTION:
expr=compileExtension(opPos);
break;
case OpCodes.OP_FUNCTION:
expr=compileFunction(opPos);
break;
case OpCodes.OP_LOCATIONPATH:
expr=locationPath(opPos);
break;
case OpCodes.OP_PREDICATE:
expr=null;
break;
case OpCodes.OP_MATCHPATTERN:
expr=matchPattern(opPos + 2);
break;
case OpCodes.OP_LOCATIONPATHPATTERN:
expr=locationPathPattern(opPos);
break;
case OpCodes.OP_QUO:
error(XPATHErrorResources.ER_UNKNOWN_OPCODE,new Object[]{"quo"});
break;
default :
error(XPATHErrorResources.ER_UNKNOWN_OPCODE,new Object[]{Integer.toString(getOp(opPos))});
}
return expr;
}

public Expression compile ( int opPos ) throws TransformerException { int op = getOp ( opPos ) ; Expression expr = null ; switch ( op ) { case OpCodes . OP_XPATH : expr = compile ( opPos + 2 ) ; break ; case OpCodes . OP_OR : expr = or ( opPos ) ; break ; case OpCodes . OP_AND : expr = and ( opPos ) ; break ; case OpCodes . OP_NOTEQUALS : expr = notequals ( opPos ) ; break ; case OpCodes . OP_EQUALS : expr = equals ( opPos ) ; break ; case OpCodes . OP_LTE : expr = lte ( opPos ) ; break ; case OpCodes . OP_LT : expr = lt ( opPos ) ; break ; case OpCodes . OP_GTE : expr = gte ( opPos ) ; break ; case OpCodes . OP_GT : expr = gt ( opPos ) ; break ; case OpCodes . OP_PLUS : expr = plus ( opPos ) ; break ; case OpCodes . OP_MINUS : expr = minus ( opPos ) ; break ; case OpCodes . OP_MULT : expr = mult ( opPos ) ; break ; case OpCodes . OP_DIV : expr = div ( opPos ) ; break ; case OpCodes . OP_MOD : expr = mod ( opPos ) ; break ; case OpCodes . OP_NEG : expr = neg ( opPos ) ; break ; case OpCodes . OP_STRING : expr = string ( opPos ) ; break ; case OpCodes . OP_BOOL : expr = bool ( opPos ) ; break ; case OpCodes . OP_NUMBER : expr = number ( opPos ) ; break ; case OpCodes . OP_UNION : expr = union ( opPos ) ; break ; case OpCodes . OP_LITERAL : expr = literal ( opPos ) ; break ; case OpCodes . OP_VARIABLE : expr = variable ( opPos ) ; break ; case OpCodes . OP_GROUP : expr = group ( opPos ) ; break ; case OpCodes . OP_NUMBERLIT : expr = numberlit ( opPos ) ; break ; case OpCodes . OP_ARGUMENT : expr = arg ( opPos ) ; break ; case OpCodes . OP_EXTFUNCTION : expr = compileExtension ( opPos ) ; break ; case OpCodes . OP_FUNCTION : expr = compileFunction ( opPos ) ; break ; case OpCodes . OP_LOCATIONPATH : expr = locationPath ( opPos ) ; break ; case OpCodes . OP_PREDICATE : expr = null ; break ; case OpCodes . OP_MATCHPATTERN : expr = matchPattern ( opPos + 2 ) ; break ; case OpCodes . OP_LOCATIONPATHPATTERN : expr = locationPathPattern ( opPos ) ; break ; case OpCodes . OP_QUO : error ( XPATHErrorResources . ER_UNKNOWN_OPCODE , new Object [ ] { "quo" } ) ; break ; default : error ( XPATHErrorResources . ER_UNKNOWN_OPCODE , new Object [ ] { Integer . toString ( getOp ( opPos ) ) } ) ; } return expr ; }
execute the xpath object from a given opcode position .
