Exemplo n.º 1
0
 public override void VisitStructObject(StructObjectDeclaration element)
 {
     VisitElement(element.getStructName());
     Console.Write(" ");
     VisitElement(element.getObjName());
     Console.Write(";\n");
 }
Exemplo n.º 2
0
 public abstract void VisitStructObject(StructObjectDeclaration element);
Exemplo n.º 3
0
 public override void VisitStructObject(StructObjectDeclaration element)
 {
     //throw new NotImplementedException();
 }
Exemplo n.º 4
0
        public override void VisitStructObject(StructObjectDeclaration element)
        {
            //throw new NotImplementedException();
            //s s1;
            if (element != null)
            {
                if (mVariableMap.ContainsKey(element.getStructName().getText()))
                {
                    Object name = mVariableMap[element.getStructName().getText()];
                    if (GetTypeOfElement((Element)(name)) == 4)
                    {
                        StructDeclaration temp = (StructDeclaration)name;
                        if (temp != null)
                        {
                            StructDeclaration obj = new StructDeclaration();
                            List<ScalarVariableDeclaration> l1 = new List<ScalarVariableDeclaration>();
                            l1 = temp.getVarType();
                            for (int i = 0; i < l1.Count; i++)
                                obj.setVarType(l1[i]);
                            obj.setName(element.getObjName());
                            mVariableMap.Add(element.getObjName().getText(), obj);
                        }
                        else
                        {
                            Console.Write("Variable name used\n");
                            sendres(112, "Variable name used\n");
                        }
                    }
                    else

                        Console.Write("Object not of type struct\n");
                }
                else
                    sendres(112, "Structure not found\n");
            }
            else
                Console.Write("Null struct object\n");
        }
Exemplo n.º 5
0
        public override void VisitStructObject(StructObjectDeclaration element)
        {
            if (element != null)
            {
                Console.Write("Structure:" + element.getStructName().getText());
                Console.Write("Element:" + element.getObjName().getText());
                interp.sendres(114, "Structure:" + element.getStructName().getText());
                interp.sendres(114, "Element:" + element.getObjName().getText());
            }
            else
                Console.Write("Null Structure element\n");

        }