gnu.expr
Class ApplyExp

java.lang.Object
  |
  +--gnu.expr.Expression
        |
        +--gnu.expr.ApplyExp
Direct Known Subclasses:
SetApplyExp

public class ApplyExp
extends Expression

This class is used to represent "combination" or "application". A function and arguments are evaluated, and then the function applied.


Field Summary
 ApplyExp nextCall
          The next ApplyExp in ((ReferenceExp)func).binding.firstCall list.
 
Constructor Summary
ApplyExp(Expression f, Expression[] a)
           
ApplyExp(Procedure p, Expression[] a)
           
 
Method Summary
static void compile(ApplyExp exp, Compilation comp, Target target)
           
 void compile(Compilation comp, Target target)
           
static void compileToArray(Expression[] args, Compilation comp)
           
 java.lang.Object eval(Environment env)
           
 Expression[] getArgs()
           
 Expression getFunction()
           
 Type getType()
          Return the Type used to represent the values of this Expression.
 boolean isTailCall()
           
 void print(java.io.PrintWriter ps)
           
 void setTailCall(boolean tailCall)
           
 
Methods inherited from class gnu.expr.Expression
compile, compileNotePosition, compileWithPosition, getColumn, getFile, getLine, setFile, setLine, setLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextCall

public ApplyExp nextCall
The next ApplyExp in ((ReferenceExp)func).binding.firstCall list.
Constructor Detail

ApplyExp

public ApplyExp(Expression f,
                Expression[] a)

ApplyExp

public ApplyExp(Procedure p,
                Expression[] a)
Method Detail

getFunction

public final Expression getFunction()

getArgs

public final Expression[] getArgs()

isTailCall

public final boolean isTailCall()

setTailCall

public final void setTailCall(boolean tailCall)

eval

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

compile

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

compileToArray

public static void compileToArray(Expression[] args,
                                  Compilation comp)

compile

public static void compile(ApplyExp exp,
                           Compilation comp,
                           Target target)

print

public void print(java.io.PrintWriter ps)
Overrides:
print in class Expression

getType

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