protected void captureSimState(SimState settings,
								   CharStream input,
								   DFAState dfaState)
	{
		settings.index = input.index();
		settings.line = line;
		settings.charPos = charPositionInLine;
		settings.dfaState = dfaState;
	}
Evaluate a predicate specified in the lexer.

<p>If {@code speculative} is {@code true}, this method was called before
{@link #consume} for the matched character. This method should call
{@link #consume} before evaluating the predicate to ensure position
sensitive values, including {@link Lexer#getText}, {@link Lexer#getLine},
and {@link Lexer#getCharPositionInLine}, properly reflect the current
lexer state. This method should restore {@code input} and the simulator
to the original state before returning (i.e. undo the actions made by the
call to {@link #consume}.</p>

@param input The input stream.
@param ruleIndex The rule containing the predicate.
@param predIndex The index of the predicate within the rule.
@param speculative {@code true} if the current index in {@code input} is
one character before the predicate's location.

@return {@code true} if the specified predicate evaluates to
{@code true}.
runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java