|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.CompileDebugger
This class is used by compiler when it compiles code. For each line compiled compiler asks CompileDebugger to create a CompileInfo object and passes it to the GUIBrain.
Field Summary | |
private java.lang.String |
comment
This field contains current comment. |
private CompileInfo |
info
This field contains current CompileInfo object. |
private int |
phase
This field contains current phase of compilation. |
private java.lang.String |
statusMessage
This field contains current statusmessage. |
Constructor Summary | |
CompileDebugger()
This is the only constructor for CompileDebugger. |
Method Summary | |
void |
finalFirstPhase(java.lang.String[] codeArea,
java.lang.String[] dataArea,
java.lang.String[][] symbolTable)
This method is used when all DC and DS are defined and compiler is ready to move to the second phase. |
void |
finalPhase()
This method tells debugger that final phase of compilation is in progress. |
void |
firstPhase()
This method is used when all lines are checked in the first phase of compilation and compiler is setting symbols and labels. |
void |
firstPhase(int lineNumber,
java.lang.String lineContents)
This method tells debugger that first round of compilation is in progres and line wasn't empty. |
void |
foundDC(java.lang.String name)
This method tells debugger that a DC compiler instruction was found and it is added to the symboltable. |
void |
foundDS(java.lang.String name)
This method tells debugger that a DS compiler instruction was found and it is added to the symboltable. |
void |
foundEQU(java.lang.String name,
int value)
This method tells that an EQU was found and it is added to the symboltable. |
void |
foundLabel(java.lang.String name,
int lineNumber)
This method tells that for given label points to given line. |
void |
foundSymbol(java.lang.String name)
This Method tells debugger that a symbol was used as an address. |
CompileInfo |
lineCompiled()
This method returns the created CompileInfo-object. |
void |
secondPhase(int lineNumber,
java.lang.String lineContents)
This method tells debugger that the second round of compilation is in progress. |
void |
setBinary(int binary)
This method sets the compiled value of a line during the second round of compilation. |
void |
setComment(java.lang.String message)
This method sets the comment to the compileInfo. |
void |
setStatusMessage(java.lang.String message)
This method sets the status info to the compileInfo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private CompileInfo info
private int phase
private java.lang.String statusMessage
private java.lang.String comment
Constructor Detail |
public CompileDebugger()
Method Detail |
public void foundEQU(java.lang.String name, int value)
name
- String containing name of the symbol.value
- Int containing the value.public void foundDS(java.lang.String name)
name
- String containing name of the symbol.public void foundDC(java.lang.String name)
name
- String containing name of the symbol.public void foundSymbol(java.lang.String name)
name
- String containing name of the symbol.public void foundLabel(java.lang.String name, int lineNumber)
name
- String containing name of the symbol.lineNumber
- Int containing the linenumber of the label.public void setBinary(int binary)
public void firstPhase(int lineNumber, java.lang.String lineContents)
lineNumber
- Number of the compiled line.lineContents
- String containing the symbolic command.public void firstPhase()
public void finalFirstPhase(java.lang.String[] codeArea, java.lang.String[] dataArea, java.lang.String[][] symbolTable)
codeArea
- String array containing codelines.dataArea
- String array containing data.symbolTable
- 2-dimensional String array containing the symbol table.public void setComment(java.lang.String message)
public void setStatusMessage(java.lang.String message)
public void secondPhase(int lineNumber, java.lang.String lineContents)
lineNumber
- number of the compiled line.lineContents
- Contents of the line.public void finalPhase()
public CompileInfo lineCompiled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |