|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.CommonTree
com.adamcornett.cminus.tree.CMTree
com.adamcornett.cminus.tree.ExprNode
com.adamcornett.cminus.tree.OpTree
public class OpTree
An arithmetic operation node
| Nested Class Summary | |
|---|---|
static class |
OpTree.OperationType
|
| Field Summary | |
|---|---|
private ExprNode |
lhs
|
private boolean |
noExe
|
private OpTree.OperationType |
op
|
private ExprNode |
rhs
|
| Fields inherited from class com.adamcornett.cminus.tree.CMTree |
|---|
log |
| Fields inherited from class org.antlr.runtime.tree.CommonTree |
|---|
childIndex, parent, startIndex, stopIndex, token |
| Fields inherited from class org.antlr.runtime.tree.BaseTree |
|---|
children |
| Fields inherited from interface org.antlr.runtime.tree.Tree |
|---|
INVALID_NODE |
| Constructor Summary | |
|---|---|
OpTree(org.antlr.runtime.Token t)
|
|
| Method Summary | |
|---|---|
void |
emitCode(ClassGenerator classGenerator)
|
ExprNode |
getLHS()
|
Type |
getOperandType()
|
int |
getRequiredStack()
|
Type |
getReturnType()
|
ExprNode |
getRHS()
|
void |
setNoExe()
|
void |
setReturnType(Type t)
|
| Methods inherited from class com.adamcornett.cminus.tree.CMTree |
|---|
emitLineInfo, getMaxTreeDepth, getNextLabelNumber |
| Methods inherited from class org.antlr.runtime.tree.CommonTree |
|---|
dupNode, getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString |
| Methods inherited from class org.antlr.runtime.tree.BaseTree |
|---|
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private ExprNode lhs
private ExprNode rhs
private boolean noExe
private OpTree.OperationType op
| Constructor Detail |
|---|
public OpTree(org.antlr.runtime.Token t)
| Method Detail |
|---|
public void emitCode(ClassGenerator classGenerator)
emitCode in class CMTreepublic int getRequiredStack()
getRequiredStack in class CMTreepublic Type getOperandType()
getOperandType in class ExprNodepublic Type getReturnType()
public void setNoExe()
public void setReturnType(Type t)
public ExprNode getLHS()
public ExprNode getRHS()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||