![]()
|
MParseby
RequirementsThis task requires Metamata Development environment 2.0 freely available at Metamata. DescriptionInvokes the Metamata MParse compiler compiler on a grammar file. To use the mparse task, set the target attribute to the name of the grammar file to process. You also need to specify the directory containing the Metamata installation using the metamatahome attribute, so that Ant can find the MParse classes. 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. For additional information about MParse, please consult the online manual available here (PDF) Parameters
Nested elementsjvmargAdditional parameters may be passed to the VM via nested classpathSets class path (also source path unless one explicitly set). Overrides METAPATH/CLASSPATH environment variables. The classpath element represents a PATH like structure. sourcepathSets source path. Overrides the SOURCEPATH environment variable. The sourcepath element represents a PATH like structure. Example<mparse target="c:/metamata/examples/parseexamples/javagrammars/singlefile/JavaParser.jj" metamatahome="c:/metamata" cleanup="true"> <classpath> <pathelement location="c:/metamata/examples/"/> </classpath> </mparse> This invokes Metamata MParse installed in c:/metamata on one of the grammar file example (JavaParser.jj) and cleans up the intermediate Sun JavaCC file. Copyright © 2001 Apache Software Foundation. All rights Reserved. |