protected virtual void OnTokenIdentified(AsciiAtom command) { if (this.CurrentState == LexicalMachineState.INDEX_OF_ARRAY_TOKEN) { NotifyTokenIdentified?.Invoke(new Token(this.arrayToken, this.indexOrSize, false)); } else if (command.Category == AtomType.CONTROL) { NotifyTokenIdentified?.Invoke(new Token(this.CurrentState, this.currentToken, command)); NotifyTokenIdentified?.Invoke(new Token()); } else { Console.WriteLine("Lexical: sent token: " + this.currentToken); NotifyTokenIdentified?.Invoke(new Token(this.CurrentState, this.currentToken, command)); } }
public void End() { NotifyTokenIdentified?.Invoke(new Token()); }