gnu.expr
Class Special

java.lang.Object
  |
  +--gnu.expr.Special

public class Special
extends java.lang.Object
implements Printable, Compilable

A class of special one-of-a-kind builtin values.


Field Summary
static Special dfault
           
static Special eof
           
static Special key
           
static Special optional
           
static Special rest
           
static ClassType thisType
           
 
Method Summary
 void emit(Literal literal, Compilation comp)
          Emit code (in comp.method) to initialize a Literal for this value.
 int hashCode()
           
 Literal makeLiteral(Compilation comp)
          Generates a (new) Literal for this for a given Compilation.
 void print(java.io.PrintWriter ps)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

optional

public static Special optional

rest

public static Special rest

key

public static Special key

eof

public static Special eof

dfault

public static Special dfault

thisType

public static ClassType thisType
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object

print

public void print(java.io.PrintWriter ps)
Specified by:
print in interface Printable

makeLiteral

public Literal makeLiteral(Compilation comp)
Description copied from interface: Compilable
Generates a (new) Literal for this for a given Compilation. If this has sub-objects, calls Compilation.findLiteral on its components.
Specified by:
makeLiteral in interface Compilable

emit

public void emit(Literal literal,
                 Compilation comp)
Description copied from interface: Compilable
Emit code (in comp.method) to initialize a Literal for this value. Generates code to make the Literal at least ALLOACTED. Also makes it INITIALIZED, unless ALLOCATING is set (in which one of our callers will make it INITIALIZED). Never called if already ALLOCATED.
Specified by:
emit in interface Compilable