Package org.antlr.v4.runtime
package org.antlr.v4.runtime
-
ClassDescriptionANTLRErrorListener<Symbol>How 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
CharStreamsinterface.This implementation ofANTLRErrorStrategyresponds to syntax errors by immediately canceling the parse operation with aParseCancellationException.Provides an empty default implementation ofANTLRErrorListener.This implementation ofTokenStreamloads tokens from aTokenSourceon-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 creatingCharStreams from a variety of sources as of 4.7.Alternative toANTLRInputStreamwhich treats the input as a series of Unicode code points, instead of a series of UTF-16 code units.This default implementation ofTokenFactorycreatesCommonTokenobjects.This class extendsBufferedTokenStreamwith functionality to filter token streams to tokens on a particular channel (tokens whereToken.getChannel()returns a particular value).This is the default implementation ofANTLRErrorStrategyused for error reporting and recovery in ANTLR parsers.This implementation ofANTLRErrorListenercan 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 extendsParserRuleContextby 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 ofTokenSourceas a wrapper around a list ofTokenobjects.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.How to emit recognition errors for parsers.A parser simulator that mimics what ANTLR's generated parser code does.A rule invocation record for parsing.ProxyErrorListener<Symbol>This implementation ofANTLRErrorListenerdispatches 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 annotation allows multipleRuleDependencyannotations to be applied to a single element.Declares a dependency upon a grammar rule, along with a set of zero or more dependent rules.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.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.Distinguish between insert after/before to do the "insert afters" first and then the "insert befores" at same index.I'm going to try replacing range from x..y with (y-x)+1 ReplaceOp instructions.Do not buffer up the entire char stream.This interface provides information about the vocabulary used by a recognizer.This class provides a default implementation of theVocabularyinterface.
CharStreamsinterface.