|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--ponderToolkit.compiler.Compiler
Function: The main class for the Ponder Compiler. Compiles the Ponder Code and Generates Code. The Compiler contains a CodeAssembler which is responsible for the coordinating the code generation. It also allows the addition of code generators and of a policy (conflict) analyser.
| Constructor Summary | |
Compiler()
Default Constructor. |
|
Compiler(java.io.PrintStream out)
Constructor which accepts an Output stream to use as the output for compiler standard output messages |
|
Compiler(java.io.PrintStream out,
java.io.PrintStream err)
Constructor which accepts a PrintStream to use as the output for compiler standard output messages, and a second PrintStream to be used for compiler error messages |
|
| Method Summary | |
void |
addCodeGenerator(CodeGeneratorI newCodeGenerator,
int codeGenType)
add a new CodeGenerator |
void |
analyse(java.io.InputStream is,
boolean applyPrRules,
java.io.InputStream prioritiesIS)
Analyse given ponder source code for conflicts after semantically analysing it |
void |
analyse(java.lang.String filename)
Analyse given ponder source file after semantically analysing it |
void |
buildMessage(java.lang.String message)
Build Message |
void |
compile(java.io.InputStream is)
Compile given input stream connected to ponder source code |
void |
compile(java.lang.String filename)
Compile given ponder source code file and generate code |
void |
compileMessage(java.lang.String message)
Compile Message. |
void |
errorMessage(java.lang.String message)
Error Message |
ponderToolkit.compiler.syntax.node.Start |
getAST()
Return the Abstract Syntax Tree created by the Syntax Analyser (the SableCC AST). |
java.util.Hashtable |
getCodeGenerators()
get the code Generators that are going to be used to generate code |
boolean |
getCodeStoreEnabled()
Get the codeStore status of the compiler. |
java.lang.String |
getDestinationDirectory()
Get the destination directory for the code generator. |
boolean |
getEnableWarnings()
Returns true if warnings are enabled. |
java.lang.String |
getFilename()
Get the destination directory for the code generator. |
boolean |
getOfflineCompile()
Get the offline mode of the compiler. |
boolean |
getRuntimeCheckEnabled()
Get the runtimeCheck status of the compiler. |
void |
infoMessage(java.lang.String message)
Information Message |
void |
parse(java.io.InputStream is)
Parse given input stream connected to ponder source code |
void |
parse(java.lang.String filename)
Parse given ponder source code file |
void |
setAnalyzer(PolicyAnalyserI newAnalyser)
set the policy analyser |
void |
setBuildStream(java.io.PrintStream newBuildStream)
set the build stream for the compiler |
void |
setCode(java.lang.String codeText)
Set the generated code |
void |
setCodeGenerators(java.util.Hashtable newCodeGenerators)
set the code Generators that are going to be used to generate code |
void |
setCodeStoreEnabled(boolean newCodeStoreEnabled)
Set the codeStore status of the compiler. |
void |
setCodeStream(java.io.PrintStream newCodeStream)
Set the PrintStream thats going to be used to print the code |
void |
setDestinationDirectory(java.lang.String newDestDirectory)
Set the destination directory for the code generator. |
void |
setEnableVerbose(boolean newEnableVerbose)
Sets the verbose compile mode. |
void |
setEnableWarnings(boolean newEnableWarnings)
Sets the warning-enable status of the compiler |
void |
setFilename(java.lang.String newFilename)
Set the destination directory for the code generator. |
void |
setOfflineMode(boolean newOfflineCompile)
Set the offline mode of the compiler. |
void |
setOutputStream(java.io.PrintStream out)
set the output stream for the compiler |
void |
setRuntimeCheckEnabled(boolean newRuntimeCheckEnabled)
Set the runtimeCheck status of the compiler. |
void |
systemMessage(java.lang.String message)
System Message |
void |
warningMessage(java.lang.String message)
Warning Message |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Compiler(java.io.PrintStream out,
java.io.PrintStream err)
public Compiler(java.io.PrintStream out)
public Compiler()
| Method Detail |
public void setOutputStream(java.io.PrintStream out)
public void setBuildStream(java.io.PrintStream newBuildStream)
public void setEnableVerbose(boolean newEnableVerbose)
public void setEnableWarnings(boolean newEnableWarnings)
public boolean getEnableWarnings()
public void setOfflineMode(boolean newOfflineCompile)
public boolean getOfflineCompile()
public void setDestinationDirectory(java.lang.String newDestDirectory)
public java.lang.String getDestinationDirectory()
public void setFilename(java.lang.String newFilename)
public java.lang.String getFilename()
public void setRuntimeCheckEnabled(boolean newRuntimeCheckEnabled)
public boolean getRuntimeCheckEnabled()
public void setCodeStoreEnabled(boolean newCodeStoreEnabled)
public boolean getCodeStoreEnabled()
public void setCodeGenerators(java.util.Hashtable newCodeGenerators)
public java.util.Hashtable getCodeGenerators()
public void addCodeGenerator(CodeGeneratorI newCodeGenerator,
int codeGenType)
public void setAnalyzer(PolicyAnalyserI newAnalyser)
public void infoMessage(java.lang.String message)
public void warningMessage(java.lang.String message)
public void errorMessage(java.lang.String message)
public void systemMessage(java.lang.String message)
public void buildMessage(java.lang.String message)
public void compileMessage(java.lang.String message)
public void parse(java.lang.String filename)
public void parse(java.io.InputStream is)
public void compile(java.lang.String filename)
public void compile(java.io.InputStream is)
public void analyse(java.io.InputStream is,
boolean applyPrRules,
java.io.InputStream prioritiesIS)
public void analyse(java.lang.String filename)
public ponderToolkit.compiler.syntax.node.Start getAST()
public void setCodeStream(java.io.PrintStream newCodeStream)
public void setCode(java.lang.String codeText)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||