Top Interfaces Annotations Classes Enums
[default module]

Package org.antlr.v4.runtime


Interface Summary

Modifier and TypeInterface and Description
public interface
ANTLRErrorListener<Symbol>

How to emit recognition errors.

public interface
ANTLRErrorStrategy

The interface for defining strategies to deal with syntax errors encountered during a parse by ANTLR-generated parsers.

public interface
CharStream

A source of characters for an ANTLR lexer.

public interface
IntStream

A simple stream of symbols whose values are represented as integers.

public interface
ParserErrorListener

How to emit recognition errors for parsers.

public interface
Token

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.

public interface
TokenFactory

The default mechanism for creating tokens.

public interface
TokenSource

A source of tokens must provide a sequence of tokens via nextToken() and also must reveal it's source of characters; CommonToken's text is computed from a CharStream; it only store indices into the char stream.

public interface
TokenStream

An IntStream whose symbols are Token instances.

public interface
public interface
Vocabulary

This interface provides information about the vocabulary used by a recognizer.

public interface

Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
RuleDependencies

This annotation allows multiple RuleDependency annotations to be applied to a single element.

public @interface
RuleDependency

Declares a dependency upon a grammar rule, along with a set of zero or more dependent rules.

public @interface

Class Summary

Modifier and TypeClass and Description
public class
ANTLRFileStream

Deprecated as of 4.7 Please use CharStreams interface.
This is an ANTLRInputStream that is loaded from a file all at once when you construct the object.
public class
ANTLRInputStream

Deprecated as of 4.7 Please use CharStreams interface.
Vacuum all input from a Reader/InputStream and then treat it like a char[] buffer.
public class
BailErrorStrategy

This implementation of ANTLRErrorStrategy responds to syntax errors by immediately canceling the parse operation with a ParseCancellationException.

public class
BaseErrorListener

Provides an empty default implementation of ANTLRErrorListener.

public class
BufferedTokenStream

This implementation of TokenStream loads tokens from a TokenSource on-demand, and places the tokens in a buffer to provide access to any previous token by index.

public class
public abstract class
CodePointCharStream

Alternative to ANTLRInputStream which treats the input as a series of Unicode code points, instead of a series of UTF-16 code units.

public class
public class
CommonTokenFactory

This default implementation of TokenFactory creates CommonToken objects.

public class
CommonTokenStream

This class extends BufferedTokenStream with functionality to filter token streams to tokens on a particular channel (tokens where Token#getChannel returns a particular value).

public class
public class
DefaultErrorStrategy

This is the default implementation of ANTLRErrorStrategy used for error reporting and recovery in ANTLR parsers.

public class
DiagnosticErrorListener

This implementation of ANTLRErrorListener can be used to identify certain potential correctness and performance problems in grammars.

public class
FailedPredicateException

A semantic predicate failed during validation.

public class
InputMismatchException

This signifies any kind of mismatched input exceptions such as when the current input does not match the expected token.

public class
InterpreterRuleContext

This class extends ParserRuleContext by allowing the value of getRuleIndex to be explicitly set for the context.

public abstract class
Lexer

A lexer is recognizer that draws input symbols from a character stream.

public class
public class
public class
ListTokenSource

Provides an implementation of TokenSource as a wrapper around a list of Token objects.

public class
NoViableAltException

Indicates that the parser could not decide which of two or more paths to take based upon the remaining input.

public abstract class
Parser

This is all the parsing support code essentially; most of it is error recovery stuff.

public class
ParserInterpreter

A parser simulator that mimics what ANTLR's generated parser code does.

public class
ParserRuleContext

A rule invocation record for parsing.

public class
ProxyErrorListener<Symbol>

This implementation of ANTLRErrorListener dispatches all calls to a collection of delegate listeners.

public class
public class
RecognitionException

The root of the ANTLR exception hierarchy.

public abstract class
Recognizer<Symbol, ATNInterpreter extends ATNSimulator>

public class
RuleContext

A rule context is a record of a single rule invocation.

public class
RuleContextWithAltNum

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.

public class
TokenStreamRewriter

Useful for rewriting out a buffered input token stream after doing some augmentation or other manipulations on it.

public class
UnbufferedCharStream

Do not buffer up the entire char stream.

public class
public class
VocabularyImpl

This class provides a default implementation of the Vocabulary interface.

Enum Summary

Modifier and TypeEnum and Description
public enum
CharStreams

This class represents the primary interface for creating CharStreams from a variety of sources as of 4.7.

public enum