//----- public override void Execute() { kids = data.getData(); for (int a = 0; a < args.Count; a++) { ParseVar v = (ParseVar)args[a]; process(v); } }
//------ 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); } }
//----- protected ParseVar getVar(string s) { ParseVar v = new ParseVar(s); if (v.isLegal()) { return(v); } else { return(null); } }
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 void Execute() { kids = data.getData(); ptable.Items.Clear(); for (int i = 0; i < kids.Length; i++) { pline = ""; for (int j = 0; j < args.Count; j++) { ParseVar v = (ParseVar)args[j]; if (v.getType() == ParseObject.MULTVAR) { processM((MultVar)v, i); } else { process(v, i); } ptable.Items.Add(pline); } } }
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); } }
private void process(ParseVar v, int i) { pline = pline + kids[i].getData(v.getValue()).ToString() + " "; }
public string getTableName(int key) { return(ParseVar.getTableName(key)); }
public int getTableKey(string tbName) { return(ParseVar.computeValue(tbName.ToLower())); }
//---------- public ParseVar(string s) : base(-1, VAR) { value = ParseVar.computeValue(s.ToLower()); }
//----- private void process(ParseVar v) { int sortKey = v.getValue(); sortByKey(sortKey); }