Class ParseInfo


  • public class ParseInfo
    extends java.lang.Object
    This class provides access to specific and aggregate statistics gathered during profiling of a parser.
    Since:
    4.3
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DecisionInfo[] getDecisionInfo()
      Gets an array of DecisionInfo instances containing the profiling information gathered for each decision in the ATN.
      int getDFASize()
      Gets the total number of DFA states stored in the DFA cache for all decisions in the ATN.
      int getDFASize​(int decision)
      Gets the total number of DFA states stored in the DFA cache for a particular decision.
      java.util.List<java.lang.Integer> getLLDecisions()
      Gets the decision numbers for decisions that required one or more full-context predictions during parsing.
      long getTotalATNLookaheadOps()
      Gets the total number of ATN lookahead operations for SLL and LL prediction across all decisions made during parsing.
      long getTotalLLATNLookaheadOps()
      Gets the total number of ATN lookahead operations for LL prediction across all decisions made during parsing.
      long getTotalLLLookaheadOps()
      Gets the total number of LL lookahead operations across all decisions made during parsing.
      long getTotalSLLATNLookaheadOps()
      Gets the total number of ATN lookahead operations for SLL prediction across all decisions made during parsing.
      long getTotalSLLLookaheadOps()
      Gets the total number of SLL lookahead operations across all decisions made during parsing.
      long getTotalTimeInPrediction()
      Gets the total time spent during prediction across all decisions made during parsing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDecisionInfo

        public DecisionInfo[] getDecisionInfo()
        Gets an array of DecisionInfo instances containing the profiling information gathered for each decision in the ATN.
        Returns:
        An array of DecisionInfo instances, indexed by decision number.
      • getLLDecisions

        public java.util.List<java.lang.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:
        A list of decision numbers which required one or more full-context predictions during parsing.
      • getTotalTimeInPrediction

        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.
      • getTotalSLLLookaheadOps

        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.
      • getTotalLLLookaheadOps

        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.
      • getTotalSLLATNLookaheadOps

        public long getTotalSLLATNLookaheadOps()
        Gets the total number of ATN lookahead operations for SLL prediction across all decisions made during parsing.
      • getTotalLLATNLookaheadOps

        public long getTotalLLATNLookaheadOps()
        Gets the total number of ATN lookahead operations for LL prediction across all decisions made during parsing.
      • getDFASize

        public int getDFASize()
        Gets the total number of DFA states stored in the DFA cache for all decisions in the ATN.
      • getDFASize

        public int getDFASize​(int decision)
        Gets the total number of DFA states stored in the DFA cache for a particular decision.