/** 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. */ @Override public String toString() { return toString(toNotifyString()); }
public String getBacktrackingReport() { StringBuffer buf = new StringBuffer(); buf.append("Backtracking report:"); buf.append(newline); buf.append("Number of decisions that backtrack: "); buf.append(grammar.decisionsWhoseDFAsUsesSynPreds.size()); buf.append(newline); buf.append(getDFALocations(grammar.decisionsWhoseDFAsUsesSynPreds)); return buf.toString(); }
GrammarReport greport = new GrammarReport(grammar); System.out.println(greport.toString()); System.out.println(greport.getBacktrackingReport()); System.out.println(greport.getAnalysisTimeoutReport()); GrammarReport greport = new GrammarReport(grammar); Stats.writeReport(GrammarReport.GRAMMAR_STATS_FILENAME, greport.toNotifyString());
GrammarReport greport = new GrammarReport(grammar); Stats.writeReport(GrammarReport.GRAMMAR_STATS_FILENAME, greport.toNotifyString());
public static String toString(String notifyDataLine) { String[] fields = decodeReportData(notifyDataLine); if ( fields==null ) { return null;
public String getReadableString(int index) { if(index < 0 || index >= rawLines.size()) return null; else { String rawLine = rawLines.get(index); if(type.equals(StatisticsReporter.TYPE_GRAMMAR)) return GrammarReport.toString(rawLine); else if(type.equals(StatisticsReporter.TYPE_RUNTIME)) { // TJP removed 11/23/10 since we don't use anymore //return Profiler.toString(rawLine); return null; } else return StatisticsAW.shared().getReadableString(); } }
/** Create a single-line stats report about this grammar suitable to * send to the notify page at antlr.org */ public String toNotifyString() { StringBuilder buf = new StringBuilder(); ReportData data = getReportData(grammar); Field[] fields = ReportData.class.getDeclaredFields(); int i = 0; for (Field f : fields) { try { Object v = f.get(data); String s = v!=null ? v.toString() : "null"; if (i>0) buf.append('\t'); buf.append(s); } catch (Exception e) { ErrorManager.internalError("Can't get data", e); } i++; } return buf.toString(); }
if ( blockHasSynPred(d.blockAST) ) blocksWithSynPreds++;
GrammarReport greport = new GrammarReport(rootGrammar); Stats.writeReport(GrammarReport.GRAMMAR_STATS_FILENAME, greport.toNotifyString());
public static String toString(String notifyDataLine) { ReportData data = decodeReportData(notifyDataLine); if ( data ==null ) { return null;
/** Create a single-line stats report about this grammar suitable to * send to the notify page at antlr.org */ public String toNotifyString() { StringBuffer buf = new StringBuffer(); ReportData data = getReportData(grammar); Field[] fields = ReportData.class.getDeclaredFields(); int i = 0; for (Field f : fields) { try { Object v = f.get(data); String s = v!=null ? v.toString() : "null"; if (i>0) buf.append('\t'); buf.append(s); } catch (Exception e) { ErrorManager.internalError("Can't get data", e); } i++; } return buf.toString(); }
if ( blockHasSynPred(d.blockAST) ) blocksWithSynPreds++;
/** 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. */ public String toString() { return toString(toNotifyString()); }
GrammarReport greport = new GrammarReport(rootGrammar); Stats.writeReport(GrammarReport.GRAMMAR_STATS_FILENAME, greport.toNotifyString());
public String getAnalysisTimeoutReport() { StringBuffer buf = new StringBuffer(); buf.append("NFA conversion early termination report:"); buf.append(newline); buf.append("Number of NFA conversions that terminated early: "); buf.append(grammar.setOfDFAWhoseAnalysisTimedOut.size()); buf.append(newline); buf.append(getDFALocations(grammar.setOfDFAWhoseAnalysisTimedOut)); return buf.toString(); }
public static String toString(String notifyDataLine) { ReportData data = decodeReportData(notifyDataLine); if ( data ==null ) { return null;
/** Create a single-line stats report about this grammar suitable to * send to the notify page at antlr.org */ public String toNotifyString() { StringBuilder buf = new StringBuilder(); ReportData data = getReportData(grammar); Field[] fields = ReportData.class.getDeclaredFields(); int i = 0; for (Field f : fields) { try { Object v = f.get(data); String s = v!=null ? v.toString() : "null"; if (i>0) buf.append('\t'); buf.append(s); } catch (Exception e) { ErrorManager.internalError("Can't get data", e); } i++; } return buf.toString(); }
if ( blockHasSynPred(d.blockAST) ) blocksWithSynPreds++;
/** 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. */ public String toString() { return toString(toNotifyString()); }
public String getBacktrackingReport() { StringBuffer buf = new StringBuffer(); buf.append("Backtracking report:"); buf.append(newline); buf.append("Number of decisions that backtrack: "); buf.append(grammar.decisionsWhoseDFAsUsesSynPreds.size()); buf.append(newline); buf.append(getDFALocations(grammar.decisionsWhoseDFAsUsesSynPreds)); return buf.toString(); }