コード例 #1
0
        /// <summary>
        /// Extracts the outcome of one of the steps of the Thompson algorithm to a file
        /// </summary>
        public void ExctractThompsonStep(FA NFA, string filename)
        {
            FAGraphVizPrinter gp = new FAGraphVizPrinter(NFA, new UOPCore.Options <ThompsonOptions>());

            NFA.RegisterGraphPrinter(gp);
            NFA.Generate(filename, true);
        }
コード例 #2
0
        public void AddThompsonStepToReporting(FA NFA, bool generateReport = false)
        {
            FAGraphVizPrinter gp1 = new FAGraphVizPrinter(NFA, new UOPCore.Options <ThompsonOptions>(ThompsonOptions.TO_COMBINEGRAPHS));

            m_ThomsonStepsPrinter.Add(gp1);
            if (generateReport)
            {
                m_ThomsonStepsPrinter.Generate();
            }
        }
コード例 #3
0
        public ThompsonReporting(UOPCore.Options <ThompsonOptions> options)
        {
            m_options = options;

            // Initialize m_ThomsonStepsPrinter field
            m_ThomsonStepsPrinter                       = new ThomsonMultiGraphGraphVizPrinter("ThompsonSteps.dot");
            m_ThomsonStepsPrinter.e_prelude            += new Func <object, string>(p => "digraph Total { ");
            m_ThomsonStepsPrinter.e_epilogue           += new Func <object, string>(p => "} ");
            m_ThomsonStepsPrinter.e_intermediate_after += new Func <object, string>(p => {
                FAGraphVizPrinter pp = p as FAGraphVizPrinter;
                return("//" + pp.M_Graph.M_Label);
            });
        }