The following contents apply only to the Professional Edition.

Grammar Conversion Task

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:

Task configuration

Name

grammar.conversion

Attributes

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

Nested elements

The grammar.conversion task accepts any number of fileset elements (see the Ant documentation for more information).

Example

  <grammar.conversion outputformat="grxml" outputfolder="${basedir}/out/grammars" >
    <fileset dir="${basedir}/src/grammars" >
      <include name="**/*.abnf" />
    </fileset>
  </grammar.conversion>


Copyright © 2007,2008,2009,2010,2011 Nu Echo Inc.