bodewig 2003/04/16 06:02:00
Modified: . WHATSNEW
src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
Log:
Enable <antlr>'s debug attribute.
PR: 19051
Submitted by: Jorge <jorgemanrubia at terra dot es>
Revision Changes Path
1.400 +2 -0 ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/ant/WHATSNEW,v
retrieving revision 1.399
retrieving revision 1.400
diff -u -r1.399 -r1.400
--- WHATSNEW 14 Apr 2003 18:43:35 -0000 1.399
+++ WHATSNEW 16 Apr 2003 13:01:59 -0000 1.400
@@ -245,6 +245,8 @@
* A new <containsregexp> selector has been added, that selects files
if their content matches a certain regular expression.
+* <antlr>'s debug attribute has been enabled. Bugzilla Report 19051.
+
Changes from Ant 1.5.2 to Ant 1.5.3
===================================
1.25 +7 -1
ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
Index: ANTLR.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- ANTLR.java 2 Apr 2003 14:26:15 -0000 1.24
+++ ANTLR.java 16 Apr 2003 13:02:00 -0000 1.25
@@ -117,6 +117,9 @@
/** captures ANTLR's output */
private ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ /** The debug attribute */
+ private boolean debug;
+
public ANTLR() {
commandline.setVm(JavaEnvUtils.getJreExecutable("java"));
commandline.setClassname("antlr.Tool");
@@ -149,7 +152,7 @@
* Sets a flag to enable ParseView debugging
*/
public void setDebug(boolean enable) {
- log( "debug attribute is never used", Project.MSG_WARN);
+ this.debug = enable;
}
/**
@@ -336,6 +339,9 @@
}
if (traceTreeWalker) {
commandline.createArgument().setValue("-traceTreeWalker");
+ }
+ if (debug) {
+ commandline.createArgument().setValue("-debug");
}
}