public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp) { if (rlp instanceof Step) { return new ParentLocationPath(step, (Step) rlp); } else if (rlp instanceof ParentLocationPath) { final ParentLocationPath plp = (ParentLocationPath) rlp; final RelativeLocationPath newrlp = insertStep(step, plp.getPath()); return new ParentLocationPath(newrlp, plp.getStep()); } else { addError(new ErrorMsg(ErrorMsg.INTERNAL_ERR, "XPathParser.insertStep")); return rlp; } }
public ParentLocationPath(RelativeLocationPath path, Expression step) { _path = path; _step = step; _path.setParent(this); _step.setParent(this); if (_step instanceof Step) { _axisMismatch = checkAxisMismatch(); } }
public Type typeCheck(SymbolTable stable) throws TypeCheckError { stype = _step.typeCheck(stable); _path.typeCheck(stable); if (_axisMismatch) enableNodeOrdering(); return _type = Type.NodeSet; }
public void enableNodeOrdering() { SyntaxTreeNode parent = getParent(); if (parent instanceof ParentLocationPath) ((ParentLocationPath)parent).enableNodeOrdering(); else { _orderNodes = true; } }
ParentLocationPath path = new ParentLocationPath(this,step); try { path.typeCheck(getParser().getSymbolTable()); path.translate(classGen, methodGen); il.append(new ICONST(DOM.RETURN_PARENT));
stp = ((ParentLocationPath)stp).getStep();
RESULT = new ParentLocationPath(left, right); Step left = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); RESULT = new ParentLocationPath(left, right); Step mid = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(mid, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DOM.NO_TYPE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); new ParentLocationPath((RelativeLocationPath) rlp, step);
ParentLocationPath path = new ParentLocationPath(this,step); try { path.typeCheck(getParser().getSymbolTable()); path.translate(classGen, methodGen); il.append(new ICONST(DOM.RETURN_PARENT));
public void enableNodeOrdering() { SyntaxTreeNode parent = getParent(); if (parent instanceof ParentLocationPath) ((ParentLocationPath)parent).enableNodeOrdering(); else { _orderNodes = true; } }
stp = ((ParentLocationPath)stp).getStep();
RESULT = new ParentLocationPath(left, right); Step left = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); RESULT = new ParentLocationPath(left, right); Step mid = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(mid, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DOM.NO_TYPE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); new ParentLocationPath((RelativeLocationPath) rlp, step);
public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp) { if (rlp instanceof Step) { return new ParentLocationPath(step, (Step) rlp); } else if (rlp instanceof ParentLocationPath) { final ParentLocationPath plp = (ParentLocationPath) rlp; final RelativeLocationPath newrlp = insertStep(step, plp.getPath()); return new ParentLocationPath(newrlp, plp.getStep()); } else { addError(new ErrorMsg(ErrorMsg.INTERNAL_ERR, "XPathParser.insertStep")); return rlp; } }
ParentLocationPath path = new ParentLocationPath(this,step); try { path.typeCheck(getParser().getSymbolTable()); path.translate(classGen, methodGen); il.append(new ICONST(DOM.RETURN_PARENT));
public void enableNodeOrdering() { SyntaxTreeNode parent = getParent(); if (parent instanceof ParentLocationPath) ((ParentLocationPath)parent).enableNodeOrdering(); else { _orderNodes = true; } }
public ParentLocationPath(RelativeLocationPath path, Expression step) { _path = path; _step = step; _path.setParent(this); _step.setParent(this); if (_step instanceof Step) { _axisMismatch = checkAxisMismatch(); } }
stp = ((ParentLocationPath)stp).getStep();
RESULT = new ParentLocationPath(left, right); Step left = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); RESULT = new ParentLocationPath(left, right); Step mid = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(mid, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DTM.ELEMENT_NODE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); Step middle = new Step(Axis.DESCENDANTORSELF, DOM.NO_TYPE, null); ParentLocationPath ppl = new ParentLocationPath(middle, right); RESULT = new ParentLocationPath(left, ppl); new ParentLocationPath((RelativeLocationPath) rlp, step);
public RelativeLocationPath insertStep(Step step, RelativeLocationPath rlp) { if (rlp instanceof Step) { return new ParentLocationPath(step, (Step) rlp); } else if (rlp instanceof ParentLocationPath) { final ParentLocationPath plp = (ParentLocationPath) rlp; final RelativeLocationPath newrlp = insertStep(step, plp.getPath()); return new ParentLocationPath(newrlp, plp.getStep()); } else { addError(new ErrorMsg(ErrorMsg.INTERNAL_ERR, "XPathParser.insertStep")); return rlp; } }
ParentLocationPath path = new ParentLocationPath(this,step); try { path.typeCheck(getParser().getSymbolTable()); path.translate(classGen, methodGen); il.append(new ICONST(DOM.RETURN_PARENT));
public void enableNodeOrdering() { SyntaxTreeNode parent = getParent(); if (parent instanceof ParentLocationPath) ((ParentLocationPath)parent).enableNodeOrdering(); else { _orderNodes = true; } }