The following contents apply only to the Professional Edition.
The grammar conversion task can be used to convert static ABNF grammars to other formats.
Currently, the task can convert grammars to the following formats:
grammar.conversion
| Attribute | Description | Required |
|---|---|---|
outputformat |
The output format of the converted
grammars. Can be either gsl, grxml,
or both. Defaults to grxml. |
No |
outputfolder |
The directory where to put the converted grammars. If not specified, the converted grammars will be put in the same directory as the input grammars. | No |
failonerror |
Whether the build fails if a conversion error occurs. Defaults to true. |
No |
rulesfile |
Filename of
the external rule
references handling configuration file. It is usually
named .translationRules in the Eclipse
project directory. |
No |
The grammar.conversion task accepts any number
of fileset elements (see the Ant documentation for
more information).
<grammar.conversion outputformat="grxml" outputfolder="${basedir}/out/grammars" >
<fileset dir="${basedir}/src/grammars" >
<include name="**/*.abnf" />
</fileset>
</grammar.conversion>