gnu.expr
Class ReferenceExp

java.lang.Object
  extended by gnu.mapping.Procedure
      extended by gnu.mapping.Procedure0
          extended by gnu.expr.Expression
              extended by gnu.expr.AccessExp
                  extended by gnu.expr.ReferenceExp
All Implemented Interfaces:
Named, Printable
Direct Known Subclasses:
ThisExp

public class ReferenceExp
extends AccessExp

This class represents a variable reference (an identifier).


Field Summary
static int CREATE_FIELD_REFERENCE
          Create a FieldLocation referencing the binding.
static int DONT_DEREFERENCE
           
static int PREFER_BINDING2
           
static int PROCEDURE_NAME
           
 
Fields inherited from class gnu.expr.Expression
flags, NEXT_AVAIL_FLAG, noExpressions
 
Constructor Summary
ReferenceExp(Declaration binding)
           
ReferenceExp(java.lang.Object symbol)
           
ReferenceExp(java.lang.Object symbol, Declaration binding)
           
 
Method Summary
 void compile(Compilation comp, Target target)
           
 java.lang.Object eval(Environment env)
           
 boolean getDontDereference()
           
 Type getType()
          Return the Type used to represent the values of this Expression.
 boolean isProcedureName()
          True if this identifier appears in "function call position".
 void print(OutPort ps)
           
 void setDontDereference(boolean setting)
           
 void setProcedureName(boolean setting)
          Note if this identifier appears in "function call position".
 java.lang.String toString()
           
protected  Expression walk(ExpWalker walker)
           
 
Methods inherited from class gnu.expr.AccessExp
contextDecl, getBinding, getName, getSymbol, setBinding, setContextDecl, string_name
 
Methods inherited from class gnu.expr.Expression
apply, apply0, compile, compileButFirst, compileNotePosition, compileWithPosition, compileWithPosition, eval, getColumn, getFile, getFlag, getFlags, getLine, makeWhile, match0, print, printLineColumn, setFile, setFlag, setFlag, setLine, setLine, setLine, setLine, walkChildren
 
Methods inherited from class gnu.mapping.Procedure0
apply1, apply2, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getProperty, getSetter, match1, match2, match3, match4, matchN, maxArgs, minArgs, name, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DONT_DEREFERENCE

public static final int DONT_DEREFERENCE
See Also:
Constant Field Values

PROCEDURE_NAME

public static final int PROCEDURE_NAME
See Also:
Constant Field Values

PREFER_BINDING2

public static final int PREFER_BINDING2
See Also:
Constant Field Values

CREATE_FIELD_REFERENCE

public static final int CREATE_FIELD_REFERENCE
Create a FieldLocation referencing the binding.

See Also:
Constant Field Values
Constructor Detail

ReferenceExp

public ReferenceExp(java.lang.Object symbol)

ReferenceExp

public ReferenceExp(java.lang.Object symbol,
                    Declaration binding)

ReferenceExp

public ReferenceExp(Declaration binding)
Method Detail

getDontDereference

public final boolean getDontDereference()

setDontDereference

public final void setDontDereference(boolean setting)

isProcedureName

public final boolean isProcedureName()
True if this identifier appears in "function call position". If so, it should be interpreted as a function name, which makes a difference for languages (like Common Lisp) that have two name spaces.


setProcedureName

public final void setProcedureName(boolean setting)
Note if this identifier appears in "function call position".


eval

public java.lang.Object eval(Environment env)
Overrides:
eval in class Expression

compile

public void compile(Compilation comp,
                    Target target)
Specified by:
compile in class Expression

walk

protected Expression walk(ExpWalker walker)
Overrides:
walk in class Expression

print

public void print(OutPort ps)
Specified by:
print in class Expression

getType

public Type getType()
Description copied from class: Expression
Return the Type used to represent the values of this Expression.

Overrides:
getType in class Expression

toString

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