Package jflex

Class Main

java.lang.Object
jflex.Main

public class Main extends Object
This is the command-line interface.

It is responsible for parsing the commandline, getting input files, starting up the GUI if necessary, etc. and invokes LexGenerator accordingly.

Version:
JFlex 1.8.2
  • Constructor Details

    • Main

      private Main()
  • Method Details

    • parseOptions

      private static List<File> parseOptions(String[] argv) throws SilentExit
      parseOptions.
      Parameters:
      argv - an array of String objects.
      Returns:
      a List object.
      Throws:
      SilentExit - if any.
    • printUnicodePropertyValuesAndAliases

      private static void printUnicodePropertyValuesAndAliases(String unicodeVersion) throws UnicodeProperties.UnsupportedUnicodeVersionException
      Prints one Unicode property value per line, along with its aliases, if any, for the given unicodeVersion.
      Parameters:
      unicodeVersion - The Unicode version to print property values and aliases for
      Throws:
      UnicodeProperties.UnsupportedUnicodeVersionException - if unicodeVersion is not supported
    • printUsage

      private static void printUsage()
      Prints the cli usage on stdout.
    • generate

      public static void generate(String[] argv) throws SilentExit
      generate.
      Parameters:
      argv - an array of String objects.
      Throws:
      SilentExit - if any.
    • main

      public static void main(String[] argv)
      Starts the generation process with the files in argv or pops up a window to choose a file, when argv doesn't have any file entries.
      Parameters:
      argv - the commandline.
    • printSystemInfo

      public static void printSystemInfo()
      Print system information (e.g. in case of unexpected exceptions)