예제 #1
0
        public REG_EXP(string regExp_str)
        {
            this.regExp_str = regExp_str;
            nfaGraph        = new NFA_GRAPH(regExp_str);

            eClosureGraph = new E_CLOSURE_GRAPH(nfaGraph);

            dfaGraph = new DFA_GRAPH(eClosureGraph);
        }
예제 #2
0
        public NFA_GRAPH(string regExp_str)
        {
            regExp = regExp_str;
            NFA_GRAPH nfaGraph = null;

            nfaGraph = Get_NFAFromRE(0, this.regExp.Length, null);

            startNode = nfaGraph.startNode;
            endNode   = nfaGraph.endNode;

            NODE.ClearCount();
        }
예제 #3
0
        public E_CLOSURE_GRAPH(NFA_GRAPH nfaGraph)
        {
            if (nfaGraph != null)
            {
                nodesStack = new Stack <NODE>();
                nodesStack.Push(nfaGraph.startNode);

                StartNode = Get_EClosureNode(nodesStack);
            }

            E_CLOSURE_NODE.ClearCount();
        }