codesimian
Class Compile.Symbol

java.lang.Object
  extended by codesimian.CS
      extended by codesimian.IndependentCS
          extended by codesimian.Compile.Symbol
All Implemented Interfaces:
CodeSimian
Enclosing class:
Compile

Deprecated.

public static class Compile.Symbol
extends IndependentCS

ERROR: Symbol doesnt instantiate correctly, probably in CSFactory.

represents a hard-coded SYMBOL type in CodeSimian code.
Currently 2/06 there are only 3 symbols: # ( )
Its best to keep the language simple, so software can later understand its own code.


Field Summary
 java.lang.String keyword
          Deprecated.  
 char symbol
          Deprecated.  
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, FUEL, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER
 
Constructor Summary
Compile.Symbol(char symbol, java.lang.String keyword)
          Deprecated.  
 
Method Summary
 double DForProxy()
          Deprecated. D() and DForProxy() are the 2 most important functions in CS.
 java.lang.String keyword()
          Deprecated. Returns the keyword of this CS or (after more code is finished) returns parent().name();

Keyword() needs to be removed.
 int minP()
          Deprecated. Minimum quantity of Params.
 CS newInstance()
          Deprecated. The primary way to instantiate subclasses of CS.
 
Methods inherited from class codesimian.IndependentCS
B, BForProxy, C, CForProxy, countP, D, decrementMyFuel, deleteP, description, F, FForProxy, fuel, getExec, heap, I, IForProxy, insertD, insertL, insertL, insertL1, insertP, J, JForProxy, L, L, LForProxy, LForProxy, maxP, myFuel, name, P, parent, prevD, prevL, PType, S, setD, setD, setFuel, setL, setL, setL, setMyFuel, setP, setPrevExec, SForProxy, start, toString, V, VForProxy, Z, ZForProxy
 
Methods inherited from class codesimian.CS
addP, addP, addP, addP, addP, clone, cost, deleteP, getObject, indexP, indexPName, insertB, insertC, insertF, insertI, insertJ, insertS, insertZ, isIllusion, javaCode, javaCode, L, L, L, maxD, minD, overwrites, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, setB, setB, setC, setC, setCost, setDescription, setExec, setF, setF, setHeap, setI, setI, setJ, setJ, setL, setL, setL1, setName, setObject, setParent, setParsePriority, setProxyOf, setPType, setS, setS, setTester, setZ, setZ, tester, voidReflect
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

symbol

public final char symbol
Deprecated. 

keyword

public final java.lang.String keyword
Deprecated. 
Constructor Detail

Compile.Symbol

public Compile.Symbol(char symbol,
                      java.lang.String keyword)
Deprecated. 
Method Detail

minP

public int minP()
Deprecated. 
Description copied from class: CS
Minimum quantity of Params. countP() may be below minP() only a short time during compiling, and you must not EXECUTE this CS during that time or you risk an error.

Overrides:
minP in class IndependentCS

DForProxy

public double DForProxy()
Deprecated. 
Description copied from class: CS
D() and DForProxy() are the 2 most important functions in CS. They execute this CS. All other execute functions, by default, use DForProxy instead of reinventing-the-wheel for their own type.

For example, J() calls JForProxy() which calls DForProxy(). D() calls DForProxy() directly.

Execute this CS and cast to double. D() is the main EXECUTE function. D() uses DForProxy(). DForProxy() is the main action of every CS, the most important function. By default, all other primitive EXECUTE functions defer to D.
Functions that EXECUTE this CS: L(Class) L(int,Class,int) Z() B() C() S() I() J() F() D() V()

Overrides:
DForProxy in class IndependentCS

keyword

public java.lang.String keyword()
Deprecated. 
Description copied from class: CS
Returns the keyword of this CS or (after more code is finished) returns parent().name();

Keyword() needs to be removed. Keyword() can only be removed from CS.java when the primary way to instantiate the default CS types is by using newInstance() on one of the CSs in a list of default CSs.

When you instantiate someCS with someCS.parent().newInstance(), someCS.keyword() can be replaced by someCS.parent().name().

keyword() appears in the code hundreds of times. Be careful when refactoring it out.

There is intentionally no setKeyword(String) in this interface. Dont add it.

Overrides:
keyword in class IndependentCS
See Also:
CS.parent(), CS.newInstance(), CS.name()

newInstance

public CS newInstance()
Deprecated. 
Description copied from class: CS
The primary way to instantiate subclasses of CS. CodeSimian is partially a PROTOTYPE LANGUAGE.

Copies the INSTANCE CS and pointers to its childs.
anyCS.P(2) == anyCS.newInstance().P(2)


anyCS.getClass() and anyCS.newInstance().getClass() do not have to share any ancestor class except CS.class. Classes that use artificial-intelligence may choose to return a different class type to improve themselves, but that class type should try to BEHAVE SIMILARLY and must have the SAME childs when newInstance() returns it.

If a subclass is uses variables in a strange way, it may need to override newInstance() to copy them.

Returns a new CS instance of this "type". This has the same name and purpose as java.lang.Class.newInstance().

Its vague. Subclasses of CS that have trees or networks of objects that the CS depends on might need to copy the whole tree etc, or might use the same tree, or only copy the root etc. Example: the Function class might need to override newInstance() differently.

Overrides:
newInstance in class IndependentCS