Package org.antlr.v4.runtime
package org.antlr.v4.runtime
-
ClassDescriptionHow to emit recognition errors.The interface for defining strategies to deal with syntax errors encountered during a parse by ANTLR-generated parsers.Deprecated.Deprecated.as of 4.7 Please use
CharStreams
interface.This implementation ofANTLRErrorStrategy
responds to syntax errors by immediately canceling the parse operation with aParseCancellationException
.Provides an empty default implementation ofANTLRErrorListener
.This implementation ofTokenStream
loads tokens from aTokenSource
on-demand, and places the tokens in a buffer to provide access to any previous token by index.A source of characters for an ANTLR lexer.This class represents the primary interface for creatingCharStream
s from a variety of sources as of 4.7.Alternative toANTLRInputStream
which treats the input as a series of Unicode code points, instead of a series of UTF-16 code units.This default implementation ofTokenFactory
createsCommonToken
objects.This class extendsBufferedTokenStream
with functionality to filter token streams to tokens on a particular channel (tokens whereToken.getChannel()
returns a particular value).This is the default implementation ofANTLRErrorStrategy
used for error reporting and recovery in ANTLR parsers.This implementation ofANTLRErrorListener
can be used to identify certain potential correctness and performance problems in grammars.A semantic predicate failed during validation.This signifies any kind of mismatched input exceptions such as when the current input does not match the expected token.This class extendsParserRuleContext
by allowing the value ofInterpreterRuleContext.getRuleIndex()
to be explicitly set for the context.A simple stream of symbols whose values are represented as integers.A lexer is recognizer that draws input symbols from a character stream.Provides an implementation ofTokenSource
as a wrapper around a list ofToken
objects.Indicates that the parser could not decide which of two or more paths to take based upon the remaining input.This is all the parsing support code essentially; most of it is error recovery stuff.A parser simulator that mimics what ANTLR's generated parser code does.A rule invocation record for parsing.This implementation ofANTLRErrorListener
dispatches all calls to a collection of delegate listeners.The root of the ANTLR exception hierarchy.Recognizer<Symbol,ATNInterpreter extends ATNSimulator> A rule context is a record of a single rule invocation.A handy class for use with options {contextSuperClass=org.antlr.v4.runtime.RuleContextWithAltNum;} that provides a backing field / impl for the outer alternative number matched for an internal parse tree node.This class provides access to the current version of the ANTLR 4 runtime library as compile-time and runtime constants, along with methods for checking for matching version numbers and notifying listeners in the case where a version mismatch is detected.A token has properties: text, type, line, character position in the line (so we can ignore tabs), token channel, index, and source from which we obtained this token.TokenFactory<Symbol extends Token>The default mechanism for creating tokens.A source of tokens must provide a sequence of tokens viaTokenSource.nextToken()
and also must reveal it's source of characters;CommonToken
's text is computed from aCharStream
; it only store indices into the char stream.Useful for rewriting out a buffered input token stream after doing some augmentation or other manipulations on it.Do not buffer up the entire char stream.UnbufferedTokenStream<T extends Token>This interface provides information about the vocabulary used by a recognizer.This class provides a default implementation of theVocabulary
interface.
CharStreams
interface.