Browse Source

Enable <antlr>'s debug attribute.

PR: 19051
Submitted by:	Jorge <jorgemanrubia at terra dot es>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274474 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
528fbc7fd5
2 changed files with 9 additions and 1 deletions
  1. +2
    -0
      WHATSNEW
  2. +7
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java

+ 2
- 0
WHATSNEW View File

@@ -245,6 +245,8 @@ Other changes:
* 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
===================================



+ 7
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java View File

@@ -117,6 +117,9 @@ public class ANTLR extends Task {
/** 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 @@ public class ANTLR extends Task {
* Sets a flag to enable ParseView debugging
*/
public void setDebug(boolean enable) {
log( "debug attribute is never used", Project.MSG_WARN);
this.debug = enable;
}

/**
@@ -337,6 +340,9 @@ public class ANTLR extends Task {
if (traceTreeWalker) {
commandline.createArgument().setValue("-traceTreeWalker");
}
if (debug) {
commandline.createArgument().setValue("-debug");
}
}

private void validateAttributes() throws BuildException {


Loading…
Cancel
Save