edu.mit.ai.psg.jeva
Class JNDPackageDeclaration

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.SimpleNode
        |
        +--edu.mit.ai.psg.jeva.JevaNode
              |
              +--edu.mit.ai.psg.jeva.JNDPackageDeclaration

public class JNDPackageDeclaration
extends JevaNode
implements IDeclarationNode

JNDPackageDeclaration: parse node for package declarations.


Fields inherited from class edu.mit.ai.psg.jeva.SimpleNode
children, id, parent
 
Method Summary
 void computeTypeSignatures(IEnv env)
           
 IEnv eval(IEnv env)
          Evaluate this Statement; don't call this directly, use EvalMethods.eval(IStatementNode, IEnv) Every statement needs to implement an eval method.
 JNName getNameNode()
           
 Object jjtAccept(IJevaVisitor visitor, Object data)
          Accept a visitor.
 IEnv scanDeclarations(IEnv env)
           
 IEnv verifyTypes(IEnv env)
          Verify types within this statement; don't call this directly, use EvalMethods.verifyTypes(IStatementNode, IEnv).
 
Methods inherited from class edu.mit.ai.psg.jeva.JevaNode
checkInsertionPoint, find2ndTokenBeforeEndBody, findChildIndex, findPrecedingToken, findTokenBeforeChild, findTokenBeforeChild, findTokenBeforeEnd, getBeginToken, getEndToken, insertChildTokens, insertNewChildAfter, insertNewChildAt, insertNewChildBefore, jnGetChild, jnGetParent, notVerified, print, print, printSpecialTokens, printToken, printToString, printToString, removeChild, removeChildTokens, replaceChild, replaceChild, setBeginToken, setEndToken, shouldNotHappen, shouldNotHappen, shouldNotHappen, updateEndTokens, updateEndTokensPriorChild, updateEndTokensPriorNode, updateEndTokensPriorNode
 
Methods inherited from class edu.mit.ai.psg.jeva.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

jjtAccept

public Object jjtAccept(IJevaVisitor visitor,
                        Object data)
Description copied from interface: IJevaNode
Accept a visitor. For visitor design pattern: jjtAccept must simply
  return visitor.visit(this, data);  
which dispatches on the type of this to appropriate method of visitor
Overrides:
jjtAccept in class JevaNode

getNameNode

public JNName getNameNode()

scanDeclarations

public IEnv scanDeclarations(IEnv env)
                      throws VerifyingException
Specified by:
scanDeclarations in interface IDeclarationNode

computeTypeSignatures

public void computeTypeSignatures(IEnv env)
Specified by:
computeTypeSignatures in interface IDeclarationNode

verifyTypes

public IEnv verifyTypes(IEnv env)
                 throws VerifyingException
Description copied from interface: IStatementNode
Verify types within this statement; don't call this directly, use EvalMethods.verifyTypes(IStatementNode, IEnv). Builds env without evaluating anything with side effects, for the purpose of verifying types of later statements. May be used by preprocessors which must find the type of an expression in order to assign it to a new variable.
Specified by:
verifyTypes in interface IDeclarationNode
Tags copied from interface: IStatementNode
Parameters:
env - environment of names bindings.
Returns:
env or possibly extended env
Throws:
VerifyingException - if statement is illegal
See Also:
EvalMethods.verifyTypes(IStatementNode, IEnv)

eval

public IEnv eval(IEnv env)
          throws ThrowException
Description copied from interface: IStatementNode
Evaluate this Statement; don't call this directly, use EvalMethods.eval(IStatementNode, IEnv) Every statement needs to implement an eval method.
Tags copied from interface: IStatementNode
Parameters:
env - environment of names bindings.
Returns:
env or possibly extended env
Throws:
AbruptCompletionException - if abruptly completed with return, throw, break, or continue.
See Also:
EvalMethods.eval(IStatementNode, IEnv)

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu