Top Description Fields Constructors Methods
org.antlr.v4.runtime.atn

public Class ParseInfo

extends Object
Class Inheritance
Imports
org.antlr.v4.runtime.dfa.DFA, org.antlr.v4.runtime.misc.NotNull, java.util.ArrayList, .List

This class provides access to specific and aggregate statistics gathered during profiling of a parser.
Since
4.3

Field Summary

Modifier and TypeField and Description
protected final ProfilingATNSimulator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public DecisionInfo[]

Returns:

An array of DecisionInfo instances, indexed by decision number.
getDecisionInfo
()

Gets an array of DecisionInfo instances containing the profiling information gathered for each decision in the ATN.

public int
getDFASize()

Gets the total number of DFA states stored in the DFA cache for all decisions in the ATN.

public int
getDFASize(int decision)

Gets the total number of DFA states stored in the DFA cache for a particular decision.

public List<Integer>

Returns:

A list of decision numbers which required one or more full-context predictions during parsing.
getLLDecisions
()

Gets the decision numbers for decisions that required one or more full-context predictions during parsing.

public long
getTotalATNLookaheadOps()

Gets the total number of ATN lookahead operations for SLL and LL prediction across all decisions made during parsing.

public long
getTotalLLATNLookaheadOps()

Gets the total number of ATN lookahead operations for LL prediction across all decisions made during parsing.

public long
getTotalLLLookaheadOps()

Gets the total number of LL lookahead operations across all decisions made during parsing.

public long
getTotalSLLATNLookaheadOps()

Gets the total number of ATN lookahead operations for SLL prediction across all decisions made during parsing.

public long
getTotalSLLLookaheadOps()

Gets the total number of SLL lookahead operations across all decisions made during parsing.

public long
getTotalTimeInPrediction()

Gets the total time spent during prediction across all decisions made during parsing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

atnSimulatorback to summary
protected final ProfilingATNSimulator atnSimulator

Constructor Detail

ParseInfoback to summary
public ParseInfo(ProfilingATNSimulator atnSimulator)

Method Detail

getDecisionInfoback to summary
public DecisionInfo[] getDecisionInfo()

Gets an array of DecisionInfo instances containing the profiling information gathered for each decision in the ATN.

Returns:DecisionInfo[]

An array of DecisionInfo instances, indexed by decision number.

Annotations
@NotNull
getDFASizeback to summary
public int getDFASize()

Gets the total number of DFA states stored in the DFA cache for all decisions in the ATN.

getDFASizeback to summary
public int getDFASize(int decision)

Gets the total number of DFA states stored in the DFA cache for a particular decision.

getLLDecisionsback to summary
public List<Integer> getLLDecisions()

Gets the decision numbers for decisions that required one or more full-context predictions during parsing. These are decisions for which DecisionInfo#LL_Fallback is non-zero.

Returns:List<Integer>

A list of decision numbers which required one or more full-context predictions during parsing.

Annotations
@NotNull
getTotalATNLookaheadOpsback to summary
public long getTotalATNLookaheadOps()

Gets the total number of ATN lookahead operations for SLL and LL prediction across all decisions made during parsing.

This value is the sum of getTotalSLLATNLookaheadOps and getTotalLLATNLookaheadOps.

getTotalLLATNLookaheadOpsback to summary
public long getTotalLLATNLookaheadOps()

Gets the total number of ATN lookahead operations for LL prediction across all decisions made during parsing.

getTotalLLLookaheadOpsback to summary
public long getTotalLLLookaheadOps()

Gets the total number of LL lookahead operations across all decisions made during parsing. This value is the sum of DecisionInfo#LL_TotalLook for all decisions.

getTotalSLLATNLookaheadOpsback to summary
public long getTotalSLLATNLookaheadOps()

Gets the total number of ATN lookahead operations for SLL prediction across all decisions made during parsing.

getTotalSLLLookaheadOpsback to summary
public long getTotalSLLLookaheadOps()

Gets the total number of SLL lookahead operations across all decisions made during parsing. This value is the sum of DecisionInfo#SLL_TotalLook for all decisions.

getTotalTimeInPredictionback to summary
public long getTotalTimeInPrediction()

Gets the total time spent during prediction across all decisions made during parsing. This value is the sum of DecisionInfo#timeInPrediction for all decisions.