edu.mit.ai.psg.jevaES
Class JNEPostfixExpression

java.lang.Object
  |
  +--edu.mit.ai.psg.jevaES.SimpleNode
        |
        +--edu.mit.ai.psg.jevaES.JevaNode
              |
              +--edu.mit.ai.psg.jevaES.ExpressionNode
                    |
                    +--edu.mit.ai.psg.jevaES.JNEPostfixExpression

public class JNEPostfixExpression
extends ExpressionNode
implements JevaESParserConstants

Jeva parse node for postfix expressions (x++, x--). Parser ensures that only nodes implementing IExpressionStoreNode can be argument.


Fields inherited from class edu.mit.ai.psg.jevaES.SimpleNode
children, id, parent
 
Fields inherited from interface edu.mit.ai.psg.jevaES.JevaESParserConstants
_DEFAULT, ABSTRACT, ANDASSIGN, ASSIGN, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELSE, EOF, EQ, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LONG, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE, WHITE_SPACE, XOR, XORASSIGN
 
Method Summary
 boolean computeIsConstant(IEnv env)
          Compute whether this expression is a constant (nodes should not call this method directly).
 Class computeType(IEnv env)
          Compute the static type of the expression (nodes should not call this method directly).
 Object eval(IEnv env)
          Evaluate this expression (nodes should not call this method directly).
 IExpressionStoreNode getStoreNode()
           
 
Methods inherited from class edu.mit.ai.psg.jevaES.ExpressionNode
getType, getValue, isConstant
 
Methods inherited from class edu.mit.ai.psg.jevaES.JevaNode
getBeginToken, getEndToken, notVerified, print, print, printToken, printToString, printToString, setBeginToken, setEndToken, shouldNotHappen, shouldNotHappen, shouldNotHappen
 
Methods inherited from class edu.mit.ai.psg.jevaES.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

getStoreNode

public IExpressionStoreNode getStoreNode()

computeType

public Class computeType(IEnv env)
                  throws VerifyingException
Description copied from class: ExpressionNode
Compute the static type of the expression (nodes should not call this method directly). Called by getType.
Overrides:
computeType in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
VerifyingException - if expression is illegal
See Also:
EvalMethods.getType(IExpressionNode, IEnv)

computeIsConstant

public boolean computeIsConstant(IEnv env)
Description copied from class: ExpressionNode
Compute whether this expression is a constant (nodes should not call this method directly). Called by the isConstant method.
Overrides:
computeIsConstant in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
VerifyingException - if expression is illegal.
See Also:
ExpressionNode.isConstant(edu.mit.ai.psg.jevaES.IEnv), EvalMethods.isConstant(IExpressionNode, IEnv)

eval

public Object eval(IEnv env)
            throws ThrowException
Description copied from class: ExpressionNode
Evaluate this expression (nodes should not call this method directly). Called by the getValue method.
Overrides:
eval in class ExpressionNode
Tags copied from class: ExpressionNode
Parameters:
env - environment of name bindings, etc.
Throws:
ThrowException - if abruptly completed with an exception
See Also:
ExpressionNode.getValue(edu.mit.ai.psg.jevaES.IEnv), EvalMethods.eval(IExpressionNode, IEnv)

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu