JFlex

Class Emitter

public final class Emitter extends Object

This class manages the actual code generation, putting the scanner together, filling in skeleton sections etc. Table compression, String packing etc. is also done here.
Field Summary
static Filedirectory
Constructor Summary
Emitter(File inputFile, LexParse parser, DFA dfa)
Method Summary
voidemit()
static Filenormalize(String name, File path, File input)
Constructs a file in a path or in the same directory as another file.
static URLtoURL(File file)
Converts an abstract pathname into a file: URL.

Field Detail

directory

public static File directory

Constructor Detail

Emitter

public Emitter(File inputFile, LexParse parser, DFA dfa)

Method Detail

emit

public void emit()

normalize

public static File normalize(String name, File path, File input)
Constructs a file in a path or in the same directory as another file. Makes a backup if the file already exists.

Parameters: name the name (without path) of the file path the path where to construct the file input fallback location if path = null (expected to be a file in the directory to write to)

toURL

public static URL toURL(File file)
Converts an abstract pathname into a file: URL. The exact form of the URL is system-dependent. If it can be determined that the file denoted by this abstract pathname is a directory, then the resulting URL will end with a slash.