JFlex

Class Out

public final class Out extends Object implements ErrorMessages

In this class all output to the java console is filtered. Use the switches VERBOSE, TIME and DUMP at compile time to determine the verbosity of JFlex output. There is no switch for suppressing error messages. VERBOSE and TIME can be overridden by command line paramters. Redirects output to a TextArea in GUI mode. Counts error and warning messages.
Field Summary
static booleanDEBUG
If DEBUG is true, additional verbose debug information is produced
static booleanDOT
If DOT is true, jflex will write graphviz .dot files for generated automata
static booleanDUMP
If DUMP is true, you will be flooded with information (e.g. dfa tables).
static interrors
count total errors
static StringNL
platform dependent newline sequence
static booleanTIME
If TIME is true, jflex will print time statistics about the generation process
static booleanVERBOSE
If VERBOSE is false, no progress output will be generated
static intwarnings
count total warnings
Method Summary
static voidcheckErrors()
throws a GeneratorException if there are any errors recorded
static voiddebug(String message)
Dump debug information to System.out Use like this if (Out.DEBUG) Out.debug(message) to save performance during normal operation (when DEBUG is turned off).
static voiddump(String message)
All parts of JFlex, that want to provide dump information should use this method for their output.
static voiderror(String message)
print error message (string)
static voiderror(int message)
print error message (code)
static voiderror(int message, File file)
IO error message for a file (displays file name in parentheses).
static voiderror(File file, int message, int line, int column)
print error message with location information
static voidprint(String message)
All parts of JFlex, that want to report generation progress should use this method for their output.
static voidprintln(String message)
All parts of JFlex, that want to report generation progress should use this method for their output.
static voidprintSystemInfo()
Print system information (e.g. in case of unexpected exceptions)
static voidrequestBugReport(Error e)
Request a bug report for an unexpected Exception/Error.
static voidresetCounters()
reset error and warning counters
static voidsetGUIMode(TextArea text)
Switches to GUI mode if text is not null
static voidshowPosition(File file, int line, int column)
prints a line of a file with marked position.
static voidshowPosition(File file, int line)
print a line of a file
static voidstatistics()
print error and warning statistics
static voidtime(String message)
All parts of JFlex, that want to report something about time statistic should use this method for their output.
static voidwarning(String message)
print a warning without position information
static voidwarning(int message, int line)
print a warning with line information
static voidwarning(File file, int message, int line, int column)
print warning message with location information

Field Detail

DEBUG

public static final boolean DEBUG
If DEBUG is true, additional verbose debug information is produced

DOT

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

DUMP

public static boolean DUMP
If DUMP is true, you will be flooded with information (e.g. dfa tables).

errors

public static int errors
count total errors

NL

public static final String NL
platform dependent newline sequence

TIME

public static boolean TIME
If TIME is true, jflex will print time statistics about the generation process

VERBOSE

public static boolean VERBOSE
If VERBOSE is false, no progress output will be generated

warnings

public static int warnings
count total warnings

Method Detail

checkErrors

public static void checkErrors()
throws a GeneratorException if there are any errors recorded

debug

public static void debug(String message)
Dump debug information to System.out Use like this if (Out.DEBUG) Out.debug(message) to save performance during normal operation (when DEBUG is turned off).

dump

public static void dump(String message)
All parts of JFlex, that want to provide dump information should use this method for their output.

UNKNOWN: the message to be printed

error

public static void error(String message)
print error message (string)

Parameters: message the message to print

error

public static void error(int message)
print error message (code)

Parameters: message the code of the error message

See Also: ErrorMessages

error

public static void error(int message, File file)
IO error message for a file (displays file name in parentheses).

Parameters: message the code of the error message file the file it occurred for

error

public static void error(File file, int message, int line, int column)
print error message with location information

Parameters: file the file the error occurred for message the code of the error message to print line the line number of error position column the column of error position

print

public static void print(String message)
All parts of JFlex, that want to report generation progress should use this method for their output.

Parameters: message the message to be printed

println

public static void println(String message)
All parts of JFlex, that want to report generation progress should use this method for their output.

Parameters: message the message to be printed

printSystemInfo

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

requestBugReport

public static void requestBugReport(Error e)
Request a bug report for an unexpected Exception/Error.

resetCounters

public static void resetCounters()
reset error and warning counters

setGUIMode

public static void setGUIMode(TextArea text)
Switches to GUI mode if text is not null

Parameters: text the message TextArea of the JFlex GUI

showPosition

public static void showPosition(File file, int line, int column)
prints a line of a file with marked position.

Parameters: file the file of which to show the line line the line to show column the column in which to show the marker

showPosition

public static void showPosition(File file, int line)
print a line of a file

Parameters: file the file to show line the line number

statistics

public static void statistics()
print error and warning statistics

time

public static void time(String message)
All parts of JFlex, that want to report something about time statistic should use this method for their output.

Parameters: message the message to be printed

warning

public static void warning(String message)
print a warning without position information

Parameters: message the warning message

warning

public static void warning(int message, int line)
print a warning with line information

Parameters: message code of the warning message line the line information

See Also: ErrorMessages

warning

public static void warning(File file, int message, int line, int column)
print warning message with location information

Parameters: file the file the warning is issued for message the code of the message to print line the line number of the position column the column of the position