LexerATNSimulator.evaluatePredicate

@uml 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}.

class LexerATNSimulator
protected
bool
evaluatePredicate

Meta