Browse Source

add maxmemory attribute to javacc and friends. PR 50513

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1055418 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 14 years ago
parent
commit
998309cd53
8 changed files with 62 additions and 4 deletions
  1. +1
    -1
      NOTICE
  2. +4
    -0
      WHATSNEW
  3. +6
    -0
      docs/manual/Tasks/javacc.html
  4. +7
    -0
      docs/manual/Tasks/jjdoc.html
  5. +7
    -0
      docs/manual/Tasks/jjtree.html
  6. +12
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java
  7. +12
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
  8. +13
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java

+ 1
- 1
NOTICE View File

@@ -1,5 +1,5 @@
Apache Ant
Copyright 1999-2010 The Apache Software Foundation
Copyright 1999-2011 The Apache Software Foundation

The <sync> task is based on code Copyright (c) 2002, Landmark
Graphics Corp that has been kindly donated to the Apache Software


+ 4
- 0
WHATSNEW View File

@@ -10,6 +10,10 @@ Fixed bugs:
Other changes:
--------------

* The <javacc>, <jjtree> and <jjdoc> now support a new maxmemory
attribute.
Bugzilla Report 50513.

Changes from Ant 1.8.1 TO Ant 1.8.2
===================================



+ 6
- 0
docs/manual/Tasks/javacc.html View File

@@ -181,6 +181,12 @@
<td valign="top">Sets the USER_TOKEN_MANAGER grammar option. This is a boolean option.</td>
<td valign="top" align="center">No</td>
</tr>
<tr>
<td valign="top">maxmemory</td>
<td valign="top">Max amount of memory to allocate to the forked
VM. <em>since Ant 1.8.3</em></td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Example</h3>
<blockquote><pre>


+ 7
- 0
docs/manual/Tasks/jjdoc.html View File

@@ -95,6 +95,13 @@ option.</td>

<td ALIGN=CENTER VALIGN=TOP>No</td>
</tr>

<tr>
<td valign="top">maxmemory</td>
<td valign="top">Max amount of memory to allocate to the forked
VM. <em>since Ant 1.8.3</em></td>
<td align="center" valign="top">No</td>
</tr>
</table>

<h3>


+ 7
- 0
docs/manual/Tasks/jjtree.html View File

@@ -187,6 +187,13 @@ option.</td>

<td ALIGN=CENTER VALIGN=TOP>No</td>
</tr>

<tr>
<td valign="top">maxmemory</td>
<td valign="top">Max amount of memory to allocate to the forked
VM. <em>since Ant 1.8.3</em></td>
<td align="center" valign="top">No</td>
</tr>
</table>

<h3>


+ 12
- 1
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJDoc.java View File

@@ -58,6 +58,7 @@ public class JJDoc extends Task {

private CommandlineJava cmdl = new CommandlineJava();

private String maxMemory = null;

/**
* Sets the TEXT BNF documentation option.
@@ -102,6 +103,16 @@ public class JJDoc extends Task {
this.javaccHome = javaccHome;
}

/**
* Corresponds -Xmx.
*
* @param max max memory parameter.
* @since Ant 1.8.3
*/
public void setMaxmemory(String max) {
maxMemory = max;
}

/**
* Constructor
*/
@@ -154,8 +165,8 @@ public class JJDoc extends Task {
cmdl.setClassname(JavaCC.getMainClass(classpath,
JavaCC.TASKDEF_TYPE_JJDOC));

cmdl.setMaxmemory(maxMemory);
final Commandline.Argument arg = cmdl.createVmArgument();
arg.setValue("-mx140M");
arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath());

final Execute process =


+ 12
- 1
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java View File

@@ -67,6 +67,7 @@ public class JJTree extends Task {

private CommandlineJava cmdl = new CommandlineJava();

private String maxMemory = null;

/**
* Sets the BUILD_NODE_FILES grammar option.
@@ -192,6 +193,16 @@ public class JJTree extends Task {
this.javaccHome = javaccHome;
}

/**
* Corresponds -Xmx.
*
* @param max max memory parameter.
* @since Ant 1.8.3
*/
public void setMaxmemory(String max) {
maxMemory = max;
}

/**
* Constructor
*/
@@ -267,8 +278,8 @@ public class JJTree extends Task {
cmdl.setClassname(JavaCC.getMainClass(classpath,
JavaCC.TASKDEF_TYPE_JJTREE));

cmdl.setMaxmemory(maxMemory);
final Commandline.Argument arg = cmdl.createVmArgument();
arg.setValue("-mx140M");
arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath());

final Execute process =


+ 13
- 1
src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java View File

@@ -104,6 +104,8 @@ public class JavaCC extends Task {
protected static final String ORG_JJTREE_CLASS = COM_JJTREE_CLASS;
protected static final String ORG_JJDOC_CLASS = COM_JJDOC_CLASS;

private String maxMemory = null;

/**
* Sets the LOOKAHEAD grammar option.
* @param lookahead an <code>int</code> value.
@@ -308,6 +310,16 @@ public class JavaCC extends Task {
this.javaccHome = javaccHome;
}

/**
* Corresponds -Xmx.
*
* @param max max memory parameter.
* @since Ant 1.8.3
*/
public void setMaxmemory(String max) {
maxMemory = max;
}

/**
* Constructor
*/
@@ -361,8 +373,8 @@ public class JavaCC extends Task {
cmdl.setClassname(JavaCC.getMainClass(classpath,
JavaCC.TASKDEF_TYPE_JAVACC));

cmdl.setMaxmemory(maxMemory);
final Commandline.Argument arg = cmdl.createVmArgument();
arg.setValue("-mx140M");
arg.setValue("-Dinstall.root=" + javaccHome.getAbsolutePath());

Execute.runCommand(this, cmdl.getCommandline());


Loading…
Cancel
Save