//------ private void processM(MultVar v, int i) { ArrayList vlist = v.getVector(); for (int k = 0; k < vlist.Count; k++) { ParseVar pv = (ParseVar)vlist[k]; process(pv, i); } }
//----- private void process(MultVar v) { ArrayList mvec = v.getVector(); for (int k = mvec.Count - 1; k >= 0; k--) { ParseVar pv = (ParseVar)mvec[k]; int sortKey = pv.getValue(); sortByKey(sortKey); } }
public override bool interpret() { if (topStack(ParseVar.VAR, ParseVar.VAR)) { //reduces VAR VAR to MULTVAR ParseVar v1 = (ParseVar)stk.pop(); ParseVar v2 = (ParseVar)stk.pop(); MultVar mv = new MultVar(v2, v1); stk.push(mv); return(true); } else { return(false); } }
public override bool interpret() { if (topStack(ParseVar.VAR, ParseVar.MULTVAR)) { //reduce Var MultVar to MultVar ParseVar v = (ParseVar)stk.pop(); MultVar mv = (MultVar)stk.pop(); mv.add(v); stk.push(mv); return(true); } else { return(false); } }
public override bool interpret() { //reduce Var to Multvar if (topStack(ParseObject.MULTVAR, ParseObject.VAR)) { MultVar mv = new MultVar(); MultVar mvo = (MultVar)stk.pop(); ParseVar v = (ParseVar)stk.pop(); mv.add(v); ArrayList mvec = mvo.getVector(); for (int i = 0; i < mvec.Count; i++) { mv.add((ParseVar)mvec[i]); } stk.push(mv); return(true); } else { return(false); } }
public void addArgs(MultVar mv) { args = mv.getVector(); }