Exemplo n.º 1
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Switch");
     CompareExpression.Dump(blockNode);
     for (int c = 0; c < _caseList.Count; ++c) {
         ParseNode node = _caseList[c];
         if (node != null) {
             node.Dump(blockNode);
         }
         node = _labelList[c];
         if (node != null) {
             node.Dump(blockNode);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Program");
     blockNode.Attribute("Name", Name);
     blockNode.Attribute("IsExecutable", IsExecutable.ToString());
     Globals.Dump(blockNode);
     Root.Dump(blockNode);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Return");
     if (ReturnExpression != null) {
         ReturnExpression.Dump(blockNode);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     root.Node("Null");
 }
Exemplo n.º 5
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("BinaryOp");
     blockNode.Attribute("ID", ID.ToString());
     Left.Dump(blockNode);
     Right.Dump(blockNode);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML subNode = root.Node("Line");
     subNode.Attribute("Number", LineNumber.ToString());
 }
Exemplo n.º 7
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Loop");
     if (LoopVariable != null) {
         LoopVariable.Dump(blockNode.Node("LoopVariable"));
     }
     if (LoopValue != null) {
         LoopValue.Dump(blockNode.Node("LoopValue"));
     }
     if (StartExpression != null) {
         StartExpression.Dump(blockNode.Node("StartExpression"));
     }
     if (EndExpression != null) {
         EndExpression.Dump(blockNode.Node("EndExpression"));
     }
     if (StepExpression != null) {
         StepExpression.Dump(blockNode.Node("StepExpression"));
     }
     if (LoopBody != null) {
         blockNode = blockNode.Node("LoopBody");
         foreach (ParseNode node in LoopBody.Nodes) {
             node.Dump(blockNode);
         }
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Array");
     Identifier.Dump(blockNode);
     blockNode.Write("StartRange", StartRange.ToString());
     blockNode.Write("EndRange", EndRange.ToString());
     blockNode.Write("RangeValue", RangeValue.ToString());
 }
Exemplo n.º 9
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Call");
     ProcName.Dump(blockNode);
     Parameters.Dump(blockNode);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("ExtCall");
     blockNode.Attribute("Inline", Inline.ToString());
     blockNode.Write("LibraryName", LibraryName);
     blockNode.Write("Name", Name);
     Parameters.Dump(blockNode);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Parameter");
     _paramNode.Dump(blockNode);
     if (_symbol != null) {
         _symbol.Dump(blockNode);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Identifier");
     blockNode.Attribute("Name", Symbol.Name);
     if (HasIndexes) {
         ParseNodeXML subNode = blockNode.Node("Indexes");
         foreach (ParseNode index in Indexes) {
             index.Dump(subNode);
         }
     }
     if (HasSubstring) {
         ParseNodeXML subNode = blockNode.Node("Substring");
         SubstringStart.Dump(subNode);
         if (SubstringEnd != null) {
             SubstringEnd.Dump(subNode);
         }
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("WriteItem");
     WriteParamsNode.Dump(blockNode);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Write");
     blockNode.Attribute("FirstColumnSpecial", FirstColumnSpecial.ToString());
     WriteManagerParamsNode.Dump(blockNode.Node("WriteManagerParams"));
     WriteParamsNode.Dump(blockNode.Node("WriteParams"));
     if (ArgList != null) {
         ArgList.Dump(blockNode);
     }
 }
Exemplo n.º 15
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("ReadItem");
     ReadParamsNode.Dump(blockNode);
 }
Exemplo n.º 16
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Read");
     ReadManagerParamsNode.Dump(blockNode.Node("ReadManagerParams"));
     ReadParamsNode.Dump(blockNode.Node("ReadParams"));
     ArgList.Dump(blockNode);
 }
Exemplo n.º 17
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML subNode = root.Node("Local");
     subNode.Attribute("Index", _local.Index.ToString());
 }
Exemplo n.º 18
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Conditional");
     for (int c = 0; c < _exprList.Count; ++c) {
         ParseNode expr = _exprList[c];
         if (expr != null) {
             expr.Dump(blockNode);
         }
         ParseNode body = _bodyList[c];
         if (body != null) {
             body.Dump(blockNode);
         }
     }
 }
Exemplo n.º 19
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Symbols");
     foreach (Symbol symbol in Symbols) {
         symbol.Dump(blockNode);
     }
 }
Exemplo n.º 20
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML subNode = root.Node("Label");
     subNode.Attribute("Name", Label.Name);
 }
Exemplo n.º 21
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Block");
     foreach (ParseNode node in Nodes) {
         node.Dump(blockNode);
     }
 }
Exemplo n.º 22
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML subNode = root.Node("Filename");
     subNode.Attribute("Name", Filename);
 }
Exemplo n.º 23
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("UnaryOp");
     blockNode.Attribute("ID", ID.ToString());
     Operand.Dump(blockNode);
 }
Exemplo n.º 24
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML subNode = root.Node("Number");
     subNode.Attribute("Value", Value.ToString());
 }
Exemplo n.º 25
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Goto");
     blockNode.Attribute("IsZeroBased", IsZeroBased.ToString());
     if (ValueExpression != null) {
         ValueExpression.Dump(blockNode);
     }
     foreach (ParseNode node in Nodes) {
         node.Dump(blockNode);
     }
 }
Exemplo n.º 26
0
 /// <summary>
 /// Dumps the contents of this parse node to the ParseNode XML
 /// output under the specified parent node.
 /// </summary>
 /// <param name="root">The parent XML node</param>
 public override void Dump(ParseNodeXML root)
 {
     ParseNodeXML blockNode = root.Node("Assign");
     Identifier.Dump(blockNode);
     ValueExpression.Dump(blockNode);
 }
Exemplo n.º 27
0
        /// <summary>
        /// Dumps the contents of this parse node to the ParseNode XML
        /// output under the specified parent node.
        /// </summary>
        /// <param name="root">The parent XML node</param>
        public override void Dump(ParseNodeXML root)
        {
            ParseNodeXML blockNode = root.Node("Procedure");
            blockNode.Attribute("Name", ProcedureSymbol.Name);
            blockNode.Attribute("IsMainProgram", IsMainProgram.ToString());
            LocalSymbols.Dump(blockNode);

            ParseNodeXML initNode = blockNode.Node("InitList");
            foreach (ParseNode init in InitList.Nodes) {
                init.Dump(initNode);
            }

            ParseNodeXML statementNode = blockNode.Node("Statements");
            foreach (ParseNode statement in Nodes) {
                statement.Dump(statementNode);
            }
        }