Ejemplo n.º 1
0
 internal EClosureTable(NFATable nfa)
 {
     this._nfa        = nfa;
     this._rows       = new List <EClosureTableRow>();
     this._symbols    = nfa.GetAllPossibleSymbols();
     this._rowMapping = new Dictionary <string, int>();
 }
Ejemplo n.º 2
0
        public void FillTransition(string?symbol, NFATable nfa)
        {
            Debug.Assert(symbol != EPSILON_STR, $"Transition symbol is equal to the EClosure {nameof(EPSILON_STR)} const.");
            if (symbol == NFATable.Epsilon)
            {
                // TODO: What happens when we apply this transition?
                symbol = EPSILON_STR;
            }

            this._transitions[symbol] = nfa.ComputeNodeEClosure(nfa.ApplyTransition(this._states, symbol));
        }