Package jflex.option

Class Options

java.lang.Object
jflex.option.Options

public class Options extends Object
Collects all global JFlex options.

Can be set from command line parser, ant task, gui, etc.

Version:
JFlex 1.9.1
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static File
    output directory
    static boolean
    If true, jflex will write graphviz .dot files for generated automata
    static boolean
    If true, you will be flooded with information (e.g.
    static Charset
    The encoding to use for input and output files.
    static boolean
    strict JLex compatibility
    static boolean
    If true, dot (.) metachar matches [^\n] instead of [^\r\n …

]|"\r\n"
    static boolean
    don't write backup files if this is true
    static boolean
    don't run minimization algorithm if this is true
    static boolean
    If true, progress dots will be printed
    private static File
    The root source directory.
    private static final Set<ErrorMessages>
    Warnings that should not be printed.
    static boolean
    If true, jflex will print time statistics about the generation process
    static boolean
    If false, only error/warning output will be generated
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Prevent instantiation of static-only calss
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Configure the given warning message to be enabled.
    static File
    Get the output directory.
    static File
    Returns the root directory that contains source code.
    static boolean
    Returns true if the given warning message is suppressed (should not be printed and counted).
    static void
    Reset the root source directory to the Java working directory.
    static void
    Set the root source directory.
    static void
    Configure the given warning message to be suppressed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • suppressedWarnings

      private static final Set<ErrorMessages> suppressedWarnings
      Warnings that should not be printed.
    • directory

      public static File directory
      output directory
    • rootDirectory

      private static File rootDirectory
      The root source directory.

      In a maven project, this is the directory that contains src and target.

    • jlex

      public static boolean jlex
      strict JLex compatibility
    • no_minimize

      public static boolean no_minimize
      don't run minimization algorithm if this is true
    • no_backup

      public static boolean no_backup
      don't write backup files if this is true
    • verbose

      public static boolean verbose
      If false, only error/warning output will be generated
    • progress

      public static boolean progress
      If true, progress dots will be printed
    • time

      public static boolean time
      If true, jflex will print time statistics about the generation process
    • dot

      public static boolean dot
      If true, jflex will write graphviz .dot files for generated automata
    • dump

      public static boolean dump
      If true, you will be flooded with information (e.g. dfa tables).
    • legacy_dot

      public static boolean legacy_dot
      If true, dot (.) metachar matches [^\n] instead of [^\r\n …

]|"\r\n"
    • encoding

      public static Charset encoding
      The encoding to use for input and output files.
  • Constructor Details

    • Options

      private Options()
      Prevent instantiation of static-only calss
  • Method Details

    • getDir

      public static File getDir()
      Get the output directory.
      Returns:
      the output directory as java.io.File
    • getRootDirectory

      public static File getRootDirectory()
      Returns the root directory that contains source code. This is the java working (from system property user.dir) by default.
    • setRootDirectory

      public static void setRootDirectory(File rootDir)
      Set the root source directory.
      Parameters:
      rootDir - the root source directory.
    • resetRootDirectory

      public static void resetRootDirectory()
      Reset the root source directory to the Java working directory.
    • isSuppressed

      public static boolean isSuppressed(ErrorMessages msg)
      Returns true if the given warning message is suppressed (should not be printed and counted).
      Parameters:
      msg - the error/warning message to check
      Returns:
      true iff the warning is suppressed
    • suppress

      public static void suppress(ErrorMessages msg)
      Configure the given warning message to be suppressed.
      Parameters:
      msg - the warning message to suppress.
    • enable

      public static void enable(ErrorMessages msg)
      Configure the given warning message to be enabled.
      Parameters:
      msg - the warning message to enable.