Antlr4.Runtime.Atn.ATN.ClearDFA C# (CSharp) Method

ClearDFA() public method

public ClearDFA ( ) : void
return void
        public void ClearDFA()
        {
            decisionToDFA = new DFA[decisionToState.Count];
            for (int i = 0; i < decisionToDFA.Length; i++)
            {
                decisionToDFA[i] = new DFA(decisionToState[i], i);
            }
            modeToDFA = new DFA[modeToStartState.Count];
            for (int i_1 = 0; i_1 < modeToDFA.Length; i_1++)
            {
                modeToDFA[i_1] = new DFA(modeToStartState[i_1]);
            }
            contextCache.Clear();
            LL1Table.Clear();
        }

Usage Example

Beispiel #1
0
 /// <summary>Clear the DFA cache used by the current instance.</summary>
 /// <remarks>
 /// Clear the DFA cache used by the current instance. Since the DFA cache may
 /// be shared by multiple ATN simulators, this method may affect the
 /// performance (but not accuracy) of other parsers which are being used
 /// concurrently.
 /// </remarks>
 /// <exception cref="System.NotSupportedException">
 /// if the current instance does not
 /// support clearing the DFA.
 /// </exception>
 /// <since>4.3</since>
 public virtual void ClearDFA()
 {
     atn.ClearDFA();
 }