source: release-kits/lirk3/bin/ant-installer/web/manual1.6.2/manual/OptionalTasks/mparse.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 4.2 KB
Line 
1<!-- saved from url=(0022)http://internet.e-mail -->
2<html>
3
4<head>
5<meta http-equiv="Content-Language" content="en-us">
6<title>MParse Task</title>
7<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
8</head>
9
10<body>
11
12<h2><a name="mparse">MParse</a></h2>
13<p>by</p>
14<ul>
15 <li>Stephane Bailliez (<a href="mailto:[email protected]">[email protected]</a>)</li>
16</ul>
17<h3>Requirements</h3>
18<p>This task requires Metamata Development environment 2.0 freely available at <a href="http://www.metamata.com">Metamata</a>.</p>
19<h3>Description</h3>
20<p>
21 Invokes the Metamata <a HREF="http://www.metamata.com/parse.html">MParse</a> compiler
22 compiler on a grammar file.
23</p>
24<p>
25 To use the <i>mparse</i> task, set the <i>target</i> attribute to the name of the
26 grammar file to process. You also need to specify the directory containing
27 the Metamata installation using the <i>metamatahome</i> attribute, so that Ant
28 can find the MParse classes.
29</p>
30<p>
31 This task only invokes MParse if the grammar file is newer than the generated
32 Java files. MParse assumes that the Java class name of the generated parser
33 is the same as the name of the grammar file, less the .jj extension.
34</p>
35
36<p>For additional information about MParse, please consult the online manual available <a href="http://download.metamata.com/parse.pdf">here</a>
37(PDF)
38</p>
39
40<h3>Parameters</h3>
41<table border="1" cellpadding="2" cellspacing="0">
42 <tr>
43 <td valign="top"><b>Attribute</b></td>
44 <td valign="top"><b>Description</b></td>
45 <td align="center" valign="top"><b>Required</b></td>
46 </tr>
47 <tr>
48 <td valign="top">target</td>
49 <td valign="top">The .jj grammar file to process. It will only be processed
50 if the grammar is newer than the corresponding .java file.</td>
51 <td valign="top" align="center">Yes</td>
52 </tr>
53 <tr>
54 <td valign="top">metamatahome</td>
55 <td valign="top">The home directory containing the Metamata distribution.</td>
56 <td valign="top" align="center">Yes</td>
57 </tr>
58 <tr>
59 <td valign="top">verbose</td>
60 <td valign="top">
61 Enable all messages
62 </td>
63 <td valign="top" align="center">No</td>
64 </tr>
65 <tr>
66 <td valign="top">debugparser</td>
67 <td valign="top">
68 Enables parser debugging
69 </td>
70 <td valign="top" align="center">No</td>
71 </tr>
72 <tr>
73 <td valign="top">debugscanner</td>
74 <td valign="top">
75 Enables scanner debugging
76 </td>
77 <td valign="top" align="center">No</td>
78 </tr>
79 <tr>
80 <td valign="top">cleanup</td>
81 <td valign="top">Remove the intermediate Sun
82 JavaCC file created during the transformation of the grammar file.</td>
83 <td valign="top" align="center">No. Default to false</td>
84 </tr>
85 <tr>
86 <td valign="top">maxmemory</td>
87 <td valign="top">Set the maximum memory for the JVM. this is a convenient
88 way to set the -mx or -Xmx argument.</td>
89 <td valign="top" align="center">No</td>
90 </tr>
91</table>
92<h3>Nested elements</h3>
93<h4>jvmarg</h4>
94<p>Additional parameters may be passed to the VM via nested <code>&lt;jvmarg&gt;</code>
95attributes. <code>&lt;jvmarg&gt;</code> allows all attributes described in <a href="../using.html#arg">Command
96line arguments</a>.</p>
97<h4>classpath</h4>
98<p>Sets class path (also source path unless one explicitly set). Overrides
99METAPATH/CLASSPATH environment variables. &nbsp;The <tt>classpath</tt> element represents a <a href="../using.html#path">PATH like
100structure</a>.</p>
101<h4>sourcepath</h4>
102<p>Sets source path. Overrides the SOURCEPATH environment variable.&nbsp;The <tt>sourcepath</tt> element represents a <a href="../using.html#path">PATH like
103structure</a>.</p>
104<h3>Example</h3>
105<pre> &lt;mparse target=&quot;c:/metamata/examples/parseexamples/javagrammars/singlefile/JavaParser.jj&quot;
106 metamatahome=&quot;c:/metamata&quot; cleanup=&quot;true&quot;&gt;
107 &lt;classpath&gt;
108 &lt;pathelement location=&quot;c:/metamata/examples/&quot;/&gt;
109 &lt;/classpath&gt;
110 &lt;/mparse&gt;</pre>
111<p>
112 This invokes Metamata MParse installed in <tt>c:/metamata</tt> on one of the grammar file
113example <tt>(JavaParser.jj)</tt>
114 and cleans up the intermediate Sun JavaCC file.
115</p>
116<hr>
117<p align="center">Copyright &copy; 2001,2004 The Apache Software Foundation. All rights
118Reserved.</p>
119</body>
120</html>
Note: See TracBrowser for help on using the repository browser.