|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.compiler.Compiler
at.dms.kjc.Main
public class Main
This class implements the entry point of the Java compiler
Field Summary | |
---|---|
protected boolean |
errorFound
|
protected Vector |
infiles
|
protected KjcOptions |
options
|
Constructor Summary | |
---|---|
Main()
|
Method Summary | |
---|---|
protected void |
acceptMultiProc(JCompilationUnit[] tree)
|
protected void |
checkBody(JCompilationUnit cunit)
check that body of a given compilation unit is correct side effect: increment error number |
protected void |
checkBodyMultiProc(JCompilationUnit[] tree)
|
protected void |
checkInitializers(JCompilationUnit cunit)
check that interface of a given compilation unit is correct side effect: increment error number |
protected void |
checkInterface(JCompilationUnit cunit)
check that interface of a given compilation unit is correct side effect: increment error number |
static boolean |
compile(String[] args)
Second entry point |
protected boolean |
filterWarning(CWarning warning)
|
void |
genCode()
Generates the code from an array of compilation unit and a destination |
protected void |
genCodeMultiProc(CSourceClass[] tree,
BytecodeOptimizer optimizer,
String destination)
|
protected void |
generateJavaCode(JCompilationUnit cunit)
generate the source code of parsed compilation unit |
CSourceClass[] |
getClasses()
Returns the classes to generate |
protected WarningFilter |
getFilter()
|
KjcPrettyPrinter |
getPrettyPrinter(String fileName)
... |
protected void |
initialize()
Initialize the compiler (read classpath, check classes.zip) |
static void |
main(String[] args)
Entry point |
boolean |
parseArguments(String[] args)
Parse the argument list |
boolean |
parseComments()
Returns true iff comments should be parsed (false if to be skipped) |
protected JCompilationUnit |
parseFile(File file)
parse the givven file and return a compilation unit side effect: increment error number |
protected void |
parseMultiProc(JCompilationUnit[] tree)
Parse each file in multi thread |
void |
reportTrouble(PositionedError trouble)
Reports a trouble (error or warning). |
void |
reportTrouble(UnpositionedError trouble)
Reports a trouble. |
boolean |
run(String[] args)
Runs a compilation session |
boolean |
verboseMode()
returns true iff compilation in verbose mode is requested. |
Methods inherited from class at.dms.compiler.Compiler |
---|
checkDestination, deepClone, deepCloneInto, getTimestamp, inform, inform, inform, inform, inform, inform, inform, run, setWorkingDirectory, verifyFiles, verifyFiles |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector infiles
protected boolean errorFound
protected KjcOptions options
Constructor Detail |
---|
public Main()
Method Detail |
---|
public static void main(String[] args)
args
- the command line argumentspublic static boolean compile(String[] args)
public boolean run(String[] args)
run
in class Compiler
args
- the command line arguments
public boolean parseArguments(String[] args)
public void genCode()
protected void initialize()
public boolean verboseMode()
verboseMode
in class Compiler
public KjcPrettyPrinter getPrettyPrinter(String fileName)
protected JCompilationUnit parseFile(File file)
file
- the name of the file (assert exists)
protected void checkInterface(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkInitializers(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkBody(JCompilationUnit cunit)
cunit
- the compilation unitprotected void generateJavaCode(JCompilationUnit cunit)
cunit
- the compilation unitprotected void parseMultiProc(JCompilationUnit[] tree)
protected void checkBodyMultiProc(JCompilationUnit[] tree)
protected void acceptMultiProc(JCompilationUnit[] tree)
protected void genCodeMultiProc(CSourceClass[] tree, BytecodeOptimizer optimizer, String destination)
public void reportTrouble(PositionedError trouble)
reportTrouble
in class Compiler
trouble
- a description of the trouble to report.public void reportTrouble(UnpositionedError trouble)
trouble
- a description of the trouble to report.protected boolean filterWarning(CWarning warning)
protected WarningFilter getFilter()
public boolean parseComments()
parseComments
in class Compiler
public CSourceClass[] getClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |