|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.Binary
This class represents the contents of a binary file. It can interpret an Application instance of itself with the help of the BinaryInterpreter class, as well as transforming an Application into a string in the binary file format.
Field Summary | |
private Application |
application
This field stores the application this binary represents, or null if it has not yet been resolved. |
private java.lang.String |
contents
This field stores the binary contents of the application, or an empty string if the contents have not yet been resolved (ie. |
Constructor Summary | |
Binary(Application application)
This constructor sets up a binary instance which has already been interpreted into an application. |
|
Binary(java.lang.String contents)
This constructor sets up a binary instance. |
Method Summary | |
Application |
toApplication()
This method transforms the binary into an application file. |
java.lang.String |
toString()
This method determines (if it is not done already), stores and returns the String representation in .b91 format of this binary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private Application application
private java.lang.String contents
Constructor Detail |
public Binary(java.lang.String contents) throws java.text.ParseException
contents
- A linebreak-delimited string containing the
contents of a binary file.
java.text.ParseException
- If the string does not represent a
syntactically correct binary.public Binary(Application application)
application
- The application to form a binary of.Method Detail |
public Application toApplication() throws java.text.ParseException
java.text.ParseException
- If the binary contents are not
syntatically correct.public java.lang.String toString()
___b91___ ___code___ 0 9 (numbers of the first and the last line of code, 52428801 the latter also being the initial value of FP) 18874378 572522503 36175883 287834122 18874379 538968064 36175883 69206016 1891631115 ___data___ 10 11 (numbers the first and the last line of the data 0 area, the latter also being the initial value of SP; 0 then follow the contents of the data area in order) ___symboltable___ luku 10 (only local symbols are included, eg. HALT is summa 11 considered built-in) ___end___
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |