~ubuntu-branches/ubuntu/jaunty/ant/jaunty-proposed

« back to all changes in this revision

Viewing changes to docs/manual/OptionalTasks/mparse.html

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Gybas
  • Date: 2002-02-14 14:28:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020214142848-2ww7ynmqkj31vlmn
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

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