Package org.antlr.tool
Class GrammarReport
- java.lang.Object
-
- org.antlr.tool.GrammarReport
-
public class GrammarReport extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGrammarReport.ReportData
-
Field Summary
Fields Modifier and Type Field Description Grammargrammarstatic java.lang.StringGRAMMAR_STATS_FILENAMEstatic java.lang.Stringnewlinestatic java.lang.StringVersionBecause I may change the stats, I need to track version for later computations to be consistent.
-
Constructor Summary
Constructors Constructor Description GrammarReport(Grammar grammar)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanblockHasSynPred(GrammarAST blockAST)protected static GrammarReport.ReportDatadecodeReportData(java.lang.String dataS)java.lang.StringgetBacktrackingReport()protected java.lang.StringgetDFALocations(java.util.Set<DFA> dfas)static GrammarReport.ReportDatagetReportData(Grammar g)java.lang.StringtoNotifyString()Create a single-line stats report about this grammar suitable to send to the notify page at antlr.orgjava.lang.StringtoString()Given a stats line suitable for sending to the antlr.org site, return a human-readable version.static java.lang.StringtoString(java.lang.String notifyDataLine)
-
-
-
Field Detail
-
Version
public static final java.lang.String Version
Because I may change the stats, I need to track version for later computations to be consistent.- See Also:
- Constant Field Values
-
GRAMMAR_STATS_FILENAME
public static final java.lang.String GRAMMAR_STATS_FILENAME
- See Also:
- Constant Field Values
-
newline
public static final java.lang.String newline
-
grammar
public Grammar grammar
-
-
Constructor Detail
-
GrammarReport
public GrammarReport(Grammar grammar)
-
-
Method Detail
-
getReportData
public static GrammarReport.ReportData getReportData(Grammar g)
-
toNotifyString
public java.lang.String toNotifyString()
Create a single-line stats report about this grammar suitable to send to the notify page at antlr.org
-
getBacktrackingReport
public java.lang.String getBacktrackingReport()
-
getDFALocations
protected java.lang.String getDFALocations(java.util.Set<DFA> dfas)
-
toString
public java.lang.String toString()
Given a stats line suitable for sending to the antlr.org site, return a human-readable version. Return null if there is a problem with the data.- Overrides:
toStringin classjava.lang.Object
-
decodeReportData
protected static GrammarReport.ReportData decodeReportData(java.lang.String dataS)
-
toString
public static java.lang.String toString(java.lang.String notifyDataLine)
-
blockHasSynPred
public static boolean blockHasSynPred(GrammarAST blockAST)
-
-