Esempio n. 1
0
        public static CompressedTransitionTable Compress(DFAModel dfa)
        {
            if (dfa == null)
            {
                return null;
            }

            CompressedTransitionTable compressor = new CompressedTransitionTable(dfa);
            compressor.Compress();

            return compressor;
        }
Esempio n. 2
0
        private CompressedTransitionTable(DFAModel dfa)
        {
            m_charClassTable = new ushort[65536];

            m_stateSetDict = new Dictionary<string, ushort>();

            m_dfaStates = dfa.States;

            m_compactCharSetManager = dfa.CompactCharSetManager;

            m_compressedTransitionTable = new int[m_dfaStates.Count][];
        }
Esempio n. 3
0
        private CompressedTransitionTable(DFAModel dfa)
        {
            m_charClassTable = new ushort[65536];

            m_stateSetDict = new Dictionary <string, ushort>();

            m_dfaStates = dfa.States;

            m_compactCharSetManager = dfa.CompactCharSetManager;

            m_compressedTransitionTable = new int[m_dfaStates.Count][];
        }
Esempio n. 4
0
        public static DFAModel Create(Lexicon lexicon)
        {
            if (lexicon == null)
            {
                return null;
            }

            DFAModel newDFA = new DFAModel(lexicon);
            newDFA.ConvertLexcionToNFA();
            newDFA.ConvertNFAToDFA();

            return newDFA;
        }
Esempio n. 5
0
        public static CompressedTransitionTable Compress(DFAModel dfa)
        {
            if (dfa == null)
            {
                return(null);
            }

            CompressedTransitionTable compressor = new CompressedTransitionTable(dfa);

            compressor.Compress();

            return(compressor);
        }
Esempio n. 6
0
        public static DFAModel Create(Lexicon lexicon)
        {
            if (lexicon == null)
            {
                return(null);
            }

            DFAModel newDFA = new DFAModel(lexicon);

            newDFA.ConvertLexcionToNFA();
            newDFA.ConvertNFAToDFA();

            return(newDFA);
        }