|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.DebugInfo
fi.hu.cs.titokone.CompileInfo
This class is used to tell GUIBrain what compiler has done at the moment. CompileDebugger creates objects from this class and passes them to the GUIBrain.
Field Summary | |
(package private) java.lang.String[] |
data
|
private boolean |
finalFinal
This field contains true if we have gone through all DS and DC commands and are setting FP and SP accordingly, or false if we are still going through DS and DC commands. |
static short |
FINALIZING
|
static short |
FINALIZING_FIRST_ROUND
|
static short |
FIRST_ROUND
|
(package private) java.lang.String[] |
instructions
These arrays contain codelines, data and the symboltable after first round. |
private boolean |
labelDefined
This field is true if found label was defined before. |
private boolean |
labelFound
This field contains information if a label was found. |
private java.lang.String |
labelName
This field contains the name of a label found from the beginning of this line. |
private int |
labelValue
This field contains value of the current label. |
private int |
lineBinary
This field contains line as a binary. |
private java.lang.String |
lineContents
This field hold the contents of a compiled line. |
private boolean |
lineEmpty
This field is by default false, but if the compiled line was empty (or consisted of whitespace only), the true value here says that other checks can be skipped. |
private int |
lineNumber
This field contains the number of the line being processed or -1 during the finalizing phase. |
private short |
phase
|
static short |
SECOND_ROUND
|
private int |
symbolAddress
This field contains the address of the symbol. |
private boolean |
symbolDefined
This field is true if the symbol's value was also defined on this line. |
private boolean |
symbolFound
This field contains information if a symbol was foud. |
private java.lang.String |
symbolName
This field contains the name of a symbol found on this line from the parameter field. |
(package private) java.lang.String[][] |
symbolTable
|
private int |
symbolValue
This field contains the value of the symbol found. |
Fields inherited from class fi.hu.cs.titokone.DebugInfo |
|
Constructor Summary | |
CompileInfo(short phase)
This constructor is used when no actual line is compiled but other actions are made like finalizing the rounds. |
|
CompileInfo(short phase,
int lineNumber,
java.lang.String lineContents)
This is normal constructor for CompileInfo. |
Method Summary | |
java.lang.String[] |
getData()
This method returns the variable values after compiler has finished first round of compilation. |
boolean |
getFinalPhase()
This method returns true if field finalFinal is set. |
java.lang.String[] |
getInstructions()
This method returns codelines of the memory after compiler has finished first round of compilation. |
boolean |
getLabelFound()
This method returns true if a label was found. |
java.lang.String |
getLabelName()
This method returns the name of the current label. |
int |
getLabelValue()
This method returns value of the current label. |
int |
getLineBinary()
This method returns compiled binary machinecommand represented as an integer value. |
java.lang.String |
getLineContents()
This method return symbolic contents of the line. |
boolean |
getLineEmpty()
This message tells that an empty line or line containing only whitespaces was compiled. |
int |
getLineNumber()
This method tells which line was processed. |
short |
getPhase()
This method returns current phase as a short. |
boolean |
getSymbolDefined()
This method returns true if a symbol was defined. |
boolean |
getSymbolFound()
This method returns true if a symbol was found. |
java.lang.String |
getSymbolName()
This method returns found symbolname. |
java.lang.String[][] |
getSymbolTable()
This method returns the symboltable gathered during the first round. |
int |
getSymbolValue()
This method returns value of current symbol. |
void |
setData(java.lang.String[] data)
This method sets data area of a memory to contain all codelines after first round of compilation. |
void |
setFinal()
This method sets the boolean field finalFinal to true. |
void |
setInstructions(java.lang.String[] instructions)
This method sets memory array to contain all codelines after first round of compilation. |
void |
setLabelDefined(java.lang.String name,
int value)
This method tells CompileInfo that a given label was defined and it's value. |
void |
setLabelFound()
This method sets labelFound field. |
void |
setLabelName(java.lang.String name)
This method sets the name of a found label and sets the labelDefined field to true. |
void |
setLineBinary(int binary)
This method tells what integer represents the compiled line of the code. |
void |
setLineEmpty()
This method sets lineEmpty value to true. |
void |
setMemoryline(int lineNumber,
java.lang.String value)
This method sets given line to given value. |
void |
setSymbolFound()
This method sets symbolFound field. |
void |
setSymbolName(java.lang.String name)
This method sets the name of a found symbol. |
void |
setSymbolName(java.lang.String name,
int value)
This method sets the name of a found symbol and its value. |
void |
setSymbolTable(java.lang.String[][] symbolTable)
|
Methods inherited from class fi.hu.cs.titokone.DebugInfo |
getComments, getStatusMessage, setComments, setStatusMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short FIRST_ROUND
public static final short FINALIZING_FIRST_ROUND
public static final short SECOND_ROUND
public static final short FINALIZING
private short phase
private int lineNumber
private java.lang.String lineContents
java.lang.String[] instructions
java.lang.String[] data
java.lang.String[][] symbolTable
private boolean lineEmpty
private java.lang.String symbolName
private boolean symbolDefined
private int symbolValue
private int symbolAddress
private boolean symbolFound
private boolean labelFound
private java.lang.String labelName
private int lineBinary
private boolean labelDefined
private int labelValue
private boolean finalFinal
Constructor Detail |
public CompileInfo(short phase, int lineNumber, java.lang.String lineContents)
phase
- Short indicating which phase is going on.lineNumber
- Integer value of the current line number.lineContents
- String containing symbolic command.public CompileInfo(short phase)
phase
- short indicating which phase is going on.Method Detail |
public void setLineEmpty()
public void setSymbolFound()
public void setSymbolName(java.lang.String name)
name
- String containing the symbol name.public void setSymbolName(java.lang.String name, int value)
name
- Name of the symbol.value
- Value of the symbol.public void setLabelFound()
public void setLabelName(java.lang.String name)
name
- Name of the label.public void setLabelDefined(java.lang.String name, int value)
name
- String containing the name of the label.value
- An integer value where the label points.public void setLineBinary(int binary)
binary
- An integer value representing the symbolic command.public void setFinal()
public void setMemoryline(int lineNumber, java.lang.String value)
lineNumber
- Number of the line.value
- New value for the line.public void setInstructions(java.lang.String[] instructions)
instructions
- array containing code-lines.public void setData(java.lang.String[] data)
data
- array containing data-area.public void setSymbolTable(java.lang.String[][] symbolTable)
public boolean getLineEmpty()
public short getPhase()
public java.lang.String getLineContents()
public int getLineNumber()
public java.lang.String getSymbolName()
public boolean getSymbolDefined()
public boolean getLabelFound()
public boolean getSymbolFound()
public int getSymbolValue()
public int getLineBinary()
public java.lang.String getLabelName()
public int getLabelValue()
public boolean getFinalPhase()
public java.lang.String[] getInstructions()
public java.lang.String[] getData()
public java.lang.String[][] getSymbolTable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |