$headContent

javacc:jjdoc

Note:This goal should be used as a Maven report.

Full name:

org.codehaus.mojo:javacc-maven-plugin:2.6:jjdoc

Description:

JJDoc takes a JavaCC parser specification and produces documentation for the BNF grammar. This mojo will search the source directory for all *.jj files and run JJDoc once for each file it finds. Each of these output files, along with an index.html file will be placed in the site directory (target/site/jjdoc), and a link will be created in the "Project Reports" menu of the generated site.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Since version: 2.3.
  • Invokes the execution of the lifecycle phase generate-sources prior to executing itself.

Optional Parameters

Name Type Since Description
bnf Boolean 2.6 A flag whether to generate a plain text document with the unformatted BNF. Note that setting this option to true is only effective if the parameter text is false. Default value is false.
cssHref String 2.5 The hypertext reference to an optional CSS file for the generated HTML documents. If specified, this CSS file will be included via a <link> element in the HTML documents. Otherwise, the default style will be used.
grammarEncoding String 2.6 The file encoding to use for reading the grammar files.
Default value is: ${project.build.sourceEncoding}.
jjdocDirectory String 2.3 The relative path of the JJDoc reports in the output directory. This path will be appended to the output directory.
Default value is: jjdoc.
oneTable boolean 2.3 This option controls the structure of the generated HTML output. If set to true, a single HTML table for the entire BNF is generated. Setting it to false will produce one table for every production in the grammar.
Default value is: true.
outputDirectory File 2.3 The destination directory where JJDoc saves the generated documentation files. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.
Default value is: ${project.reporting.outputDirectory}.
sourceDirectories File[] 2.3 The directories where the JavaCC grammar files (*.jj) are located. By default, the directories ${basedir}/src/main/javacc, ${project.build.directory}/generated-sources/jjtree and ${project.build.directory}/generated-sources/jtb are scanned for grammar files to document.
text Boolean 2.3 A flag to specify the output format for the generated documentation. If set to true, JJDoc will generate a plain text description of the BNF. Some formatting is done via tab characters, but the intention is to leave it as plain as possible. Specifying false causes JJDoc to generate a hyperlinked HTML document unless the parameter bnf has been set to true. Default value is false.

Parameter Details

bnf:

A flag whether to generate a plain text document with the unformatted BNF. Note that setting this option to true is only effective if the parameter text is false. Default value is false.
  • Type: java.lang.Boolean
  • Since: 2.6
  • Required: No
  • Expression: ${bnf}

cssHref:

The hypertext reference to an optional CSS file for the generated HTML documents. If specified, this CSS file will be included via a <link> element in the HTML documents. Otherwise, the default style will be used.
  • Type: java.lang.String
  • Since: 2.5
  • Required: No
  • Expression: ${cssHref}

grammarEncoding:

The file encoding to use for reading the grammar files.
  • Type: java.lang.String
  • Since: 2.6
  • Required: No
  • Expression: ${grammarEncoding}
  • Default: ${project.build.sourceEncoding}

jjdocDirectory:

The relative path of the JJDoc reports in the output directory. This path will be appended to the output directory.
  • Type: java.lang.String
  • Since: 2.3
  • Required: No
  • Default: jjdoc

oneTable:

This option controls the structure of the generated HTML output. If set to true, a single HTML table for the entire BNF is generated. Setting it to false will produce one table for every production in the grammar.
  • Type: boolean
  • Since: 2.3
  • Required: No
  • Expression: ${oneTable}
  • Default: true

outputDirectory:

The destination directory where JJDoc saves the generated documentation files. Note that this parameter is only relevant if the goal is run from the command line or from the default build lifecycle. If the goal is run indirectly as part of a site generation, the output directory configured in the Maven Site Plugin is used instead.
  • Type: java.io.File
  • Since: 2.3
  • Required: No
  • Expression: ${outputDirectory}
  • Default: ${project.reporting.outputDirectory}

sourceDirectories:

The directories where the JavaCC grammar files (*.jj) are located. By default, the directories ${basedir}/src/main/javacc, ${project.build.directory}/generated-sources/jjtree and ${project.build.directory}/generated-sources/jtb are scanned for grammar files to document.
  • Type: java.io.File[]
  • Since: 2.3
  • Required: No

text:

A flag to specify the output format for the generated documentation. If set to true, JJDoc will generate a plain text description of the BNF. Some formatting is done via tab characters, but the intention is to leave it as plain as possible. Specifying false causes JJDoc to generate a hyperlinked HTML document unless the parameter bnf has been set to true. Default value is false.
  • Type: java.lang.Boolean
  • Since: 2.3
  • Required: No
  • Expression: ${text}