public void TerminalLexemShouldWhileAcceptedContinuesToMatch() { var terminalLexeme = new TerminalLexerRule('c').CreateLexeme(0); Assert.IsFalse(terminalLexeme.IsAccepted()); Assert.IsTrue(terminalLexeme.Scan('c')); Assert.IsTrue(terminalLexeme.IsAccepted()); Assert.IsFalse(terminalLexeme.Scan('c')); }
public void TerminalLexemeResetShouldClearPreExistingValues() { var terminalLexeme = new TerminalLexerRule('c').CreateLexeme(0); Assert.IsTrue(terminalLexeme.Scan('c')); }