Exemplo n.º 1
0
        public VarSymbolInfo(IdToken idToken, SizeToken sizeToken, ArrayList dimExprList)
            : base(idToken)
        {
            dimExprs = new Expr[dimExprList.Count];
            for (int i = 0; i < dimExprList.Count; ++i)
                dimExprs[i] = (Expr)dimExprList[i];

            this.size = Token.SizeSpecifier(sizeToken.Text);
        }
Exemplo n.º 2
0
        public void AddVarSymbol(IdToken idToken, SizeToken sizeToken, ArrayList countExprList)
        {
            AssertUndefined(idToken);
            VarSymbolInfo varSymbolInfo = new VarSymbolInfo(idToken, sizeToken, countExprList);

            AddSymbolInfo(varSymbolInfo);

            switch (sizeToken.Text.ToUpper())
            {
                case "BYTE":
                    byteVarList.Add(varSymbolInfo);
                    break;
                case "WORD":
                    wordVarList.Add(varSymbolInfo);
                    break;
                case "LONG":
                    longVarList.Add(varSymbolInfo);
                    break;
            }
        }