Skip to content

Commit d317a8d

Browse files
committed
rm err prints
1 parent 7345195 commit d317a8d

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,7 @@ java8_guava training of /Users/parrt/antlr/code/codebuff/corpus/java/training/gu
201201
median of [5:19] training 1863ms
202202
median of [5:19] formatting 2244ms
203203
```
204+
205+
## Generating graphs from paper
206+
207+
In the *Universal Code Formatting Through Machine Learning* paper, we have three graphs to support our conclusions. This sections shows how to reproduce them.

src/org/antlr/codebuff/Formatter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public void indent(int indentCat, TerminalNode node) {
291291
ParserRuleContext ancestor = Trainer.getAncestor(earliestLeftAncestor, deltaFromAncestor);
292292
Token start = null;
293293
if ( ancestor==null ) {
294-
System.err.println("Whoops. No ancestor at that delta");
294+
// System.err.println("Whoops. No ancestor at that delta");
295295
}
296296
else {
297297
ParseTree child = ancestor.getChild(childIndex);
@@ -303,7 +303,7 @@ else if ( child instanceof TerminalNode ) {
303303
}
304304
else {
305305
// uh oh.
306-
System.err.println("Whoops. Tried to access invalid child");
306+
// System.err.println("Whoops. Tried to access invalid child");
307307
}
308308
}
309309
if ( start!=null ) {
@@ -321,7 +321,7 @@ public void align(int alignOrIndent, TerminalNode node) {
321321
ParserRuleContext ancestor = Trainer.getAncestor(earliestLeftAncestor, deltaFromAncestor);
322322
Token start = null;
323323
if ( ancestor==null ) {
324-
System.err.println("Whoops. No ancestor at that delta");
324+
// System.err.println("Whoops. No ancestor at that delta");
325325
}
326326
else {
327327
ParseTree child = ancestor.getChild(childIndex);
@@ -333,7 +333,7 @@ else if (child instanceof TerminalNode) {
333333
}
334334
else {
335335
// uh oh.
336-
System.err.println("Whoops. Tried to access invalid child");
336+
// System.err.println("Whoops. Tried to access invalid child");
337337
}
338338
}
339339
if ( start!=null ) {

0 commit comments

Comments
 (0)