public final class Emitter extends Object
Table compression, String packing etc. is also done here.
Constructor and Description |
---|
Emitter(File inputFile,
LexParse parser,
DFA dfa)
Emits the java code.
|
Modifier and Type | Method and Description |
---|---|
void |
emit()
Main Emitter method.
|
void |
emitActionTable()
emitActionTable.
|
static boolean |
endsWithJavadoc(StringBuilder usercode)
Try to find out if user code ends with a javadoc comment, maybe followed by one or more
annotations
|
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.
|
public Emitter(File inputFile, LexParse parser, DFA dfa) throws IOException
inputFile
- input grammar.parser
- a LexParse
.dfa
- a DFA
.IOException
- if any.public static String getBaseName(String className)
className
- Class name for which to construct the base nameLexScan.className
public static File normalize(String name, File input)
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)public static boolean endsWithJavadoc(StringBuilder usercode)
usercode
- the user codepublic void emitActionTable()
public void emit()
Copyright © 1998–2020. All rights reserved.