|
- <html>
-
- <head>
- <meta http-equiv="Content-Language" content="en-us">
- <title>JavaCC Task</title>
- </head>
-
- <body>
-
- <h2><a name="javacc">MParse</a></h2>
- <h3>Requirements</h3>
- <p>This task requires Metamata Development environment 1.1. It does not work as
- is with the latest 2.0 version freely available at <a href="http://www.metamata.com">Metamata</a>.</p>
- <h3>Description</h3>
- <p>
- Invokes the Metamata <a HREF="http://www.metamata.com/parse.html">MParse</a> compiler
- compiler on a grammar file.
- </p>
- <p>
- To use the <i>mparse</i> task, set the <i>target</i> attribute to the name of the
- grammar file to process. You also need to specify the directory containing
- the Metamata installation using the <i>metamatahome</i> attribute, so that Ant
- can find the MParse classes.
- </p>
- <p>
- This task only invokes MParse if the grammar file is newer than the generated
- Java files. MParse assumes that the Java class name of the generated parser
- is the same as the name of the grammar file, less the .jj extension.
- </p>
-
- <p>For additional information about MParse, please consult the online manual available <a href="http://download.metamata.com/parse.pdf">here</a>
- (PDF)
- </p>
-
- <h3>Parameters</h3>
- <table border="1" cellpadding="2" cellspacing="0">
- <tr>
- <td valign="top"><b>Attribute</b></td>
- <td valign="top"><b>Description</b></td>
- <td align="center" valign="top"><b>Required</b></td>
- </tr>
- <tr>
- <td valign="top">target</td>
- <td valign="top">The .jj grammar file to process. It will only be processed
- if the grammar is newer than the corresponding .java file.</td>
- <td valign="top" align="center">Yes</td>
- </tr>
- <tr>
- <td valign="top">metamatahome</td>
- <td valign="top">The home directory containing the Metamata distribution.</td>
- <td valign="top" align="center">Yes</td>
- </tr>
- <tr>
- <td valign="top">workingdir</td>
- <td valign="top">
- The temporary directory used by MParse.
- </td>
- <td valign="top" align="center">Yes</td>
- </tr>
- <tr>
- <td valign="top">cleanuphack</td>
- <td valign="top">Remove the stale file as well as the intermediate Sun
- JavaCC file created during the transformation of the grammar file.</td>
- <td valign="top" align="center">No. Default to false.</td>
- </tr>
- </table>
- <h3>Nested elements</h3>
- <h4>userclasspath</h4>
- <p> The <tt>userclasspath</tt> element is required and represents a <a href="index.html#path">PATH like
- structure</a>.</p>
- <h3>Example</h3>
- <pre> <mparse target="src/Parser.jj" metamatahome="c:/metamata" workingdir="c:/tmp">
- <userclasspath>
- <pathelement location="./lib/dependency.jar"/>
- </userclasspath>
- </mparse></pre>
- <p>
- This invokes Metamata MParse installed in <tt>c:/metamata</tt> on a grammar file <tt>src/Parser.jj</tt>
- with a working directory in <tt>c:/tmp</tt> and a specific classpath
- </p>
- <hr>
-
|