xdocs/tag-reference/antlr_antlr.xml (59 lines of code) (raw):

<?xml version="1.0"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <document> <properties> <title>Jelly Tag Reference (antlr:antlr)</title> </properties> <body> <section name="Home Page"> <p>See <a href="http://commons.apache.org/jelly/libs/antlr/">http://commons.apache.org/jelly/libs/antlr/</a> </p> </section> <section name="Description"> <p> This tag generates java code based on <a href="http://www.antlr.org/">Antlr</a> grammar files. </p> <p> The grammars to generate are specified using nested <a href="antlr_grammar.html">grammar</a> tags. </p> <p> <strong>Warning</strong>: The grammar files must be placed in the directory specified by the <code>maven.antlr.src.dir</code> variable. This hard coding should be removed in a future release. </p> </section> <section name="Attributes"> <table> <tr> <th>Name</th> <th>Description</th> <th>Required</th> </tr> <tr> <td>outputDir</td> <td>The directory to place generated code into.</td> <td>Yes</td> </tr> </table> </section> <section name="Nested Elements"> <table> <tr> <th>Name</th> <th>Description</th> <th>Required</th> </tr> <tr> <td>grammar</td> <td> The file name (within <code>maven.antlr.src.dir</code>) to use in code generation. .</td> <td>No</td> </tr> </table> </section> <section name="Examples"> <source><![CDATA[ <j:jelly xmlns:j="jelly:core" xmlns:antlr="jelly:antlr"> <j:set var="maven.antlr.src.dir" value="${basedir}/grammars"/> <antlr:antlr outputDir="${maven.antlr.target.dir}"> <antlr:grammar>file1.antlr</antlr:grammar> </antlr:antlr> </j:jelly> ]]></source> </section> </body> </document>