コード例 #1
0
ファイル: Cuadruple.cs プロジェクト: rbtote/AGRO
 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);
 }
コード例 #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++;
            }
        }
コード例 #3
0
ファイル: Goto.cs プロジェクト: 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;
 }
コード例 #4
0
ファイル: Assign.cs プロジェクト: rbtote/AGRO
 public void setDirOut(SymbolTable _st, string varOut)
 {
     this.dirOut = _st.getDir(varOut);
 }
コード例 #5
0
ファイル: Return.cs プロジェクト: rbtote/AGRO
 public Return(string outVar, int dirGlobal, SymbolTable _st)
 {
     this.dirGlobal = dirGlobal;
     this.outVar    = outVar;
     this.dirVar    = _st.getDir(this.outVar);
 }
コード例 #6
0
 public Verify(string resultExp, int limitValue, SymbolTable _st)
 {
     this.limitValue = limitValue;
     this.dirVar     = _st.getDir(resultExp);
 }