il.getEnd(), null);
il.append(new ISTORE(match.getIndex()));
// If pattern not reduced then check kernel
if (!_isEpsilon) {
il.append(new ILOAD(match.getIndex()));
translateKernel(classGen, methodGen);
}
// Push current iterator and current node on the stack
il.append(methodGen.loadCurrentNode());
il.append(methodGen.loadIterator());
// Create a new matching iterator using the matching node
index = cpg.addMethodref(MATCHING_ITERATOR, "<init>",
"(I" + NODE_ITERATOR_SIG + ")V");
il.append(new NEW(cpg.addClass(MATCHING_ITERATOR)));
il.append(DUP);
il.append(new ILOAD(match.getIndex()));
_step.translate(classGen, methodGen);
il.append(new INVOKESPECIAL(index));
// Get the parent of the matching node
il.append(methodGen.loadDOM());
il.append(new ILOAD(match.getIndex()));
index = cpg.addInterfaceMethodref(DOM_INTF, GET_PARENT, GET_PARENT_SIG);
il.append(new INVOKEINTERFACE(index, 2));
// Start the iterator with the parent
il.append(methodGen.setStartNode());
// Overwrite current iterator and current node
il.append(methodGen.storeIterator());
il.append(new ILOAD(match.getIndex()));
il.append(methodGen.storeCurrentNode());
// Translate the expression of the predicate
Predicate pred = (Predicate) _predicates.elementAt(0);
Expression exp = pred.getExpr();