JFlex
Class 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.
void | emit() - Main Emitter method.
|
void | emitActionTable()
|
static boolean | endsWithJavadoc(StringBuffer usercode) - Try to find out if user code ends with a javadoc comment
|
static String | getBaseName(String className) - Computes base name of the class name.
|
static File | normalize(String name, File input) - Constructs a file in Options.getDir() or in the same directory as
another file.
|
Emitter
public Emitter(File inputFile,
LexParse parser,
DFA dfa)
throws IOException
emit
public void emit()
Main Emitter method.
emitActionTable
public void emitActionTable()
endsWithJavadoc
public static boolean endsWithJavadoc(StringBuffer usercode)
Try to find out if user code ends with a javadoc comment
- true if it ends with a javadoc comment
getBaseName
public static String getBaseName(String className)
Computes base name of the class name. Needs to take into account generics.
normalize
public static File normalize(String name,
File input)
Constructs a file in Options.getDir() or in the same directory as
another file. Makes a backup if the file already exists.
name
- the name (without path) of the fileinput
- fall back location if path = null
(expected to be a file in the directory to write to)