|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--antlr.BaseAST
|
+--antlr.CommonAST
|
+--junc.ast.JUnCASTNode
|
+--junc.ast.ExpressionNode
Describe class ExpressionNode here.
| Field Summary | |
org.apache.bcel.generic.InstructionList |
falseList
Describe variable falseList here. |
boolean |
leftValue
Set to true by the parser if this expression is to the left of an assignment operator. |
boolean |
statementExpression
This flag is set to true by the parser if the parent of this expression is a statement expression. |
org.apache.bcel.generic.InstructionList |
trueList
Describe variable trueList here. |
junc.types.JUnCBaseType |
type
Describe variable type here. |
| Fields inherited from class antlr.BaseAST |
down, right |
| Constructor Summary | |
ExpressionNode()
|
|
| Method Summary | |
org.apache.bcel.generic.InstructionList |
addFalseList(org.apache.bcel.generic.InstructionHandle ih)
Add an instruction to the false list for backpatching. |
org.apache.bcel.generic.InstructionList |
addTrueList(org.apache.bcel.generic.InstructionHandle ih)
Add an instruction to the true list for backpatching. |
org.apache.bcel.generic.InstructionList |
appendToFalseList(org.apache.bcel.generic.InstructionList right)
Append a list to the false list. |
org.apache.bcel.generic.InstructionList |
appendToTrueList(org.apache.bcel.generic.InstructionList right)
Append a list to the true list. |
static void |
backPatch(org.apache.bcel.generic.InstructionList list,
org.apache.bcel.generic.InstructionHandle target)
Backpatch a true or a false list. |
void |
desynthesize(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
Describe desynthesize method here. |
java.math.BigDecimal |
evaluate(junc.symtab.SymbolTable symbolTable)
Describe evaluate method here. |
java.math.BigDecimal |
evaluateExp()
Describe evaluateExp method here. |
boolean |
leftValue()
Determines if the expression is an lvalue. |
junc.types.MethodType |
lookupPrimop(junc.symtab.SymbolTable symbolTable,
int op,
junc.types.MethodType ctype)
Describe lookupPrimop method here. |
boolean |
superExp()
Determines if the expression is 'super'. |
org.apache.bcel.generic.BranchHandle |
synthesize(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
Synthesize a boolean expression, i.e., either push a 0 or 1 onto the operand stack for the next statement to succeed. |
boolean |
thisExp()
Determines if the expression is 'this'. |
boolean |
thisOrSuperExp()
Determines if the expression refers to this or super. |
void |
translate(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
Describe translate method here. |
org.apache.bcel.generic.BranchHandle |
translateSynthesized(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
First translate the expression and then synthesize it. |
junc.types.JUnCBaseType |
type()
Describe type method here. |
abstract junc.types.JUnCBaseType |
typeCheck(junc.symtab.SymbolTable symbolTable)
Describe typeCheck method here. |
boolean |
typeExp()
Determines if the expression refers to a type. |
boolean |
variableExp()
Determines if the expression is an access to a local or a formal param. |
| Methods inherited from class junc.ast.JUnCASTNode |
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber |
| Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, initialize, setText, setType |
| Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, 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 |
public junc.types.JUnCBaseType type
type here.
public org.apache.bcel.generic.InstructionList trueList
trueList here.
public org.apache.bcel.generic.InstructionList falseList
falseList here.
public boolean leftValue
public boolean statementExpression
| Constructor Detail |
public ExpressionNode()
| Method Detail |
public abstract junc.types.JUnCBaseType typeCheck(junc.symtab.SymbolTable symbolTable)
throws TypeCheckError
typeCheck method here.
typeCheck in class JUnCASTNodesymbolTable - a SymbolTable value
JUnCBaseType value
TypeCheckError - if an error occurspublic junc.types.JUnCBaseType type()
type method here.
JUnCBaseType valuepublic java.math.BigDecimal evaluateExp()
evaluateExp method here.
BigDecimal value
public java.math.BigDecimal evaluate(junc.symtab.SymbolTable symbolTable)
throws NotConstantException
evaluate method here.
symbolTable - a SymbolTable value
BigDecimal value
NotConstantException - if an error occurs
public void translate(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
translate method here.
classGen - a ClassGen valuemethodGen - a MethodGen value
public org.apache.bcel.generic.BranchHandle translateSynthesized(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
classGen - a ClassGen valuemethodGen - a MethodGen value
BranchHandle value
public org.apache.bcel.generic.BranchHandle synthesize(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
classGen - a ClassGen valuemethodGen - a MethodGen value
BranchHandle value
public void desynthesize(org.apache.bcel.generic.ClassGen classGen,
org.apache.bcel.generic.MethodGen methodGen)
desynthesize method here.
classGen - a ClassGen valuemethodGen - a MethodGen value
public junc.types.MethodType lookupPrimop(junc.symtab.SymbolTable symbolTable,
int op,
junc.types.MethodType ctype)
lookupPrimop method here.
symbolTable - a SymbolTable valueop - an int valuectype - a MethodType value
MethodType valuepublic boolean variableExp()
boolean valuepublic boolean leftValue()
boolean valuepublic boolean typeExp()
boolean valuepublic boolean thisExp()
boolean valuepublic boolean superExp()
boolean valuepublic boolean thisOrSuperExp()
boolean value
public static void backPatch(org.apache.bcel.generic.InstructionList list,
org.apache.bcel.generic.InstructionHandle target)
list - an InstructionList valuetarget - an InstructionHandle valuepublic org.apache.bcel.generic.InstructionList addTrueList(org.apache.bcel.generic.InstructionHandle ih)
ih - an InstructionHandle value
InstructionList valuepublic org.apache.bcel.generic.InstructionList addFalseList(org.apache.bcel.generic.InstructionHandle ih)
ih - an InstructionHandle value
InstructionList valuepublic org.apache.bcel.generic.InstructionList appendToTrueList(org.apache.bcel.generic.InstructionList right)
right - an InstructionList value
InstructionList valuepublic org.apache.bcel.generic.InstructionList appendToFalseList(org.apache.bcel.generic.InstructionList right)
right - an InstructionList value
InstructionList value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||