jflex:generate

Full name:

de.jflex:jflex-maven-plugin:1.9.1:generate

Description:

Generates lexical scanners from one or more JFlex grammar files.

Attributes:

  • Requires a Maven project to be executed.
  • The goal is not marked as thread-safe and thus does not support parallel builds.
  • Binds by default to the lifecycle phase: generate-sources.

Optional Parameters

Name Type Since Description
<backup> boolean - A flag whether to enable the generation of a backup copy if the generated source file already exists.
Default value is: true.
<dot> boolean - Whether to produce graphviz .dot files for the generated automata. This feature is EXPERIMENTAL.
Default value is: false.
<dump> boolean - Whether to dump full debug information.
Default value is: false.
<encodingName> String - The name of the character encoding for reading lexer specifications. Uses JVM default encoding if unset.
<generationMethod> String - The generation method to use for the scanner. The only valid value is pack.
Default value is: pack.
<jlex> boolean - Strict JLex compatibility.
Default value is: false.
<legacyDot> boolean - If true, the dot (.) metachar matches [^\n] instead of [^\n\r\u000B\u000C\u0085\u2028\u2029].
Default value is: false.
<lexDefinitions> File[] - List of grammar definitions to run the JFlex parser generator on. Each path may either specify a single grammar file or a directory. Directories will be recursively scanned for files with one of the following extensions: ".jflex", ".flex", ".jlex" or ".lex". By default, all files in src/main/jflex will be processed.
See also: SRC_MAIN_JFLEX
<minimize> boolean - A flag whether to perform the DFA minimization step during scanner generation.
Default value is: true.
<outputDirectory> File - Name of the directory into which JFlex should generate the parser.
Default value is: ${project.build.directory}/generated-sources/jflex.
<skeleton> File - Use external skeleton file.
<staleMillis> int - The granularity in milliseconds of the last modification date for testing whether a source needs regeneration.
Default value is: 0.
User property is: lastModGranularityMs.
<unusedWarning> boolean - Whether a warning will be logged when there are unused macros.
Default value is: true.
<verbose> boolean - Whether source code generation should be verbose.
Default value is: false.

Parameter Details

<backup>

A flag whether to enable the generation of a backup copy if the generated source file already exists.
  • Type: boolean
  • Required: No
  • Default: true

<dot>

Whether to produce graphviz .dot files for the generated automata. This feature is EXPERIMENTAL.
  • Type: boolean
  • Required: No
  • Default: false

<dump>

Whether to dump full debug information.
  • Type: boolean
  • Required: No
  • Default: false

<encodingName>

The name of the character encoding for reading lexer specifications. Uses JVM default encoding if unset.
  • Type: java.lang.String
  • Required: No

<generationMethod>

The generation method to use for the scanner. The only valid value is pack.
  • Type: java.lang.String
  • Required: No
  • Default: pack

<jlex>

Strict JLex compatibility.
  • Type: boolean
  • Required: No
  • Default: false

<legacyDot>

If true, the dot (.) metachar matches [^\n] instead of [^\n\r\u000B\u000C\u0085\u2028\u2029].
  • Type: boolean
  • Required: No
  • Default: false

<lexDefinitions>

List of grammar definitions to run the JFlex parser generator on. Each path may either specify a single grammar file or a directory. Directories will be recursively scanned for files with one of the following extensions: ".jflex", ".flex", ".jlex" or ".lex". By default, all files in src/main/jflex will be processed.
See also: SRC_MAIN_JFLEX
  • Type: java.io.File[]
  • Required: No

<minimize>

A flag whether to perform the DFA minimization step during scanner generation.
  • Type: boolean
  • Required: No
  • Default: true

<outputDirectory>

Name of the directory into which JFlex should generate the parser.
  • Type: java.io.File
  • Required: No
  • Default: ${project.build.directory}/generated-sources/jflex

<skeleton>

Use external skeleton file.
  • Type: java.io.File
  • Required: No

<staleMillis>

The granularity in milliseconds of the last modification date for testing whether a source needs regeneration.
  • Type: int
  • Required: No
  • User Property: lastModGranularityMs
  • Default: 0

<unusedWarning>

Whether a warning will be logged when there are unused macros.
  • Type: boolean
  • Required: No
  • Default: true

<verbose>

Whether source code generation should be verbose.
  • Type: boolean
  • Required: No
  • Default: false