JFlex
Class Emitter
java.lang.Object
JFlex.Emitter
- public final class Emitter
- extends java.lang.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.
Method Summary |
void |
emit()
|
static java.io.File |
normalize(java.lang.String name,
java.io.File path,
java.io.File input)
Constructs a file in a path or in the same directory as
another file. |
static java.net.URL |
toURL(java.io.File file)
Converts an abstract pathname into a file: URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
directory
public static java.io.File directory
Emitter
public Emitter(java.io.File inputFile,
LexParse parser,
DFA dfa)
throws java.io.IOException
normalize
public static java.io.File normalize(java.lang.String name,
java.io.File path,
java.io.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 filepath
- the path where to construct the fileinput
- fallback location if path = null
(expected to be a file in the directory to write to)
emit
public void emit()
toURL
public static java.net.URL toURL(java.io.File file)
throws java.net.MalformedURLException
- 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.
- Throws:
java.net.MalformedURLException