예제 #1
0
 public Result VisitContext(ASTComposite node, contextType ct, VParam param = default(VParam))
 {
     foreach (ASTElement item in node.MChildren[node.GetContextIndex(ct)])
     {
         item.Accept(this, param);
     }
     return(default(Result));
 }
예제 #2
0
        /// ###########################################################################|
        /// ExtractSubgraphs ##########################################################|
        /// ###########################################################################|
        /// Αυτή η μέδοδος χωρίζει τα παιδιά σε περιοχές, ανάλογα με τον γωνέα τους ###|
        /// ###########################################################################|
        private void ExtractSubgraphs(ASTComposite node, contextType context)
        {
            if (node.MChildren[node.GetContextIndex(context)].Count != 0)
            {
                m_ostream.WriteLine("\tsubgraph cluster" + m_clusterSerial++ + "{");
                m_ostream.WriteLine("\t\tnode [style=filled,color=white];");
                m_ostream.WriteLine("\t\tstyle=filled;");
                m_ostream.WriteLine("\t\tcolor=lightgrey;");
                m_ostream.Write("\t\t");
                for (int i = 0; i < node.MChildren[node.GetContextIndex(context)].Count; i++)
                {
                    m_ostream.Write(node.MChildren[node.GetContextIndex(context)][i].MNodeName + ";");
                }

                m_ostream.WriteLine("\n\t\tlabel=" + context + ";");
                m_ostream.WriteLine("\t}");
            }
        }