'Declaration Public Overloads Sub Insert( _ ByVal index As Integer, _ ByVal symbol As TerminalSymbol, _ Optional ByVal isExitSymbol As Boolean _ )
public void Insert( int index, TerminalSymbol symbol, bool isExitSymbol )
Exception | Description |
---|---|
System.InvalidOperationException | Occurs when the IsMutable value of the owning Grammar is False. |
System.ArgumentNullException | Occurs when symbol is null. |
System.ArgumentOutOfRangeException | Occurs when index is less than 0 or greater than the Count. |
System.ArgumentException | Occurs when symbol does not belong to the same Grammar as the owning LexerState. |
System.ArgumentException | Occurs when symbol is the EndOfStreamSymbol. |
System.ArgumentException | Occurs when isExitSymbol is True and the owning LexerState is the default lexer state. |
If the LexerState owning the collection is not the default lexer state, the symbol can optionally be added as an exit symbol. If it is an exit symbol, the lexer state will be exited when tokens associated with the symbol are created by the lexer. When a lexer state is exited, the lexer will go back to the state it was in before the state was entered. A LexerState will be entered when a token is created which is associated with a TerminalSymbol that has a TerminalSymbol.LexerStateToEnter set. If a TerminalSymbol is both an exit symbol and it has a LexerStateToEnter set, the LexerStateToEnter will be ignored. The lexer cannot enter and exit a state at the same time and exiting a lexer state takes precedence.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2