|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.BaseAST
antlr.CommonAST
antlr.CommonASTWithHiddenTokens
jparse.JavaAST
jparse.expr.ExpressionAST
An AST node that represents an expression
Field Summary | |
protected Type[] |
exceptions
The checked exceptions this expression might throw |
static Object |
nonconstant
A dummy object that indicates that an expression is not constant |
private static Object |
noVal
A dummy object used to determine when the value has been computed |
protected Type |
type
The type of this expression |
protected Object |
value
The constant value of this expression (possibly wrapped), or null if the expression is not constant |
Fields inherited from class jparse.JavaAST |
context, currSymTable, noTypes, symTable, topLevel, typeAST |
Fields inherited from class antlr.CommonASTWithHiddenTokens |
hiddenAfter, hiddenBefore |
Fields inherited from class antlr.CommonAST |
|
Fields inherited from class antlr.BaseAST |
down, right |
Constructor Summary | |
protected |
ExpressionAST()
Create a new expression AST |
protected |
ExpressionAST(antlr.Token token)
Create a new expression AST |
Method Summary | |
protected abstract Type[] |
computeExceptions()
Compute the checked exception types that might be thrown by this expression |
protected abstract Type |
computeType()
Compute the type of this expression |
protected abstract Object |
computeValue()
Compute the constant value of this expression, if any |
Type[] |
getExceptionTypes()
Get the checked exception types that might be thrown by this expression |
Object |
getValue()
Get the constant value of this expression, if it has one, or null if it does not |
abstract VarList |
getVarList()
Get the list of variables read and written by this expression |
Type |
retrieveType()
Retrieve the type of this expression |
Methods inherited from class jparse.JavaAST |
parseComplete, print, printHiddenAfter, printHiddenBefore |
Methods inherited from class antlr.CommonASTWithHiddenTokens |
getHiddenAfter, getHiddenBefore, initialize |
Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, setText, setType |
Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getColumn, getFirstChild, getLine, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final Object noVal
public static final Object nonconstant
protected Type type
protected Type[] exceptions
protected Object value
null
if the expression is not constant
Constructor Detail |
protected ExpressionAST()
protected ExpressionAST(antlr.Token token)
token
- the token represented by this AST nodeMethod Detail |
public final Type retrieveType()
protected abstract Type computeType()
public final Type[] getExceptionTypes()
getExceptionTypes
in interface HasExceptions
protected abstract Type[] computeExceptions()
public final Object getValue()
null
if it does not
protected abstract Object computeValue()
public abstract VarList getVarList()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |