Esempio n. 1
0
 public Cuadruple(int op, string varA, string varB, string varOut, SymbolTable _st, Dictionary <int, string> dict)
 {
     this.varA    = varA;
     this.varB    = varB;
     this.varOut  = varOut;
     this.dirA    = _st.getDir(varA);
     this.dirB    = _st.getDir(varB);
     this.op      = op;
     this.oper    = dict[op];
     this.typeOut = Cube.getInstance().outputCube(_st.getType(varA), _st.getType(varB), op, dict);
 }
Esempio n. 2
0
        public Param(string paramType, string varName, int count, SymbolTable _st, List <Actions> program)
        {
            this.paramType = paramType;
            this.varName   = varName;
            this.dirVar    = _st.getDir(varName);
            this.count     = count;

            program.Add(this);

            int dims = 1;

            if (_st.getDim1(varName) != 0)
            {
                if (_st.getDim2(varName) != 0)
                {
                    dims = _st.getDim1(varName) * _st.getDim2(varName);
                }
                else
                {
                    dims = _st.getDim1(varName);
                }
            }

            int tmpDirVar = dirVar + 1;

            while (dims > 1)
            {
                program.Add(new Param(paramType, tmpDirVar, count));
                dims--;
                tmpDirVar++;
            }
        }
Esempio n. 3
0
File: Goto.cs Progetto: rbtote/AGRO
 public Goto(int typeGoto, string varCond, SymbolTable _st, Dictionary <int, string> dict)
 {
     this.typeGoto = typeGoto;
     this.oper     = dict[typeGoto];
     if (typeGoto != 68) //68 is plain goto
     {
         this.varCond    = varCond;
         this.dirVarCond = _st.getDir(varCond);
         this.valid      = Cube.getInstance().outputCube(_st.getType(varCond), 1, 17, dict); //The variable received with int(1) equals(17)
     }
     //this.direction = direction;
 }
Esempio n. 4
0
 public void setDirOut(SymbolTable _st, string varOut)
 {
     this.dirOut = _st.getDir(varOut);
 }
Esempio n. 5
0
 public Return(string outVar, int dirGlobal, SymbolTable _st)
 {
     this.dirGlobal = dirGlobal;
     this.outVar    = outVar;
     this.dirVar    = _st.getDir(this.outVar);
 }
Esempio n. 6
0
 public Verify(string resultExp, int limitValue, SymbolTable _st)
 {
     this.limitValue = limitValue;
     this.dirVar     = _st.getDir(resultExp);
 }