com.adamcornett.cminus.tree
Class CSTree

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTree
      extended by org.antlr.runtime.tree.CommonTree
          extended by com.adamcornett.cminus.tree.CMTree
              extended by com.adamcornett.cminus.tree.CSTree
All Implemented Interfaces:
ScopeNode, org.antlr.runtime.tree.Tree

public class CSTree
extends CMTree
implements ScopeNode

A tree node with an associated scope

Author:
Adam Cornett

Field Summary
private  int csNum
           
private  Scope s
           
 
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
CSTree(org.antlr.runtime.Token payload)
           
 
Method Summary
 void emitCode(ClassGenerator classGenerator)
           
 Object getCsNum()
           
 int getRequiredStack()
           
 Scope getScope()
           
 int getScopeNumber()
           
 void setScope(Scope s)
           
 
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

csNum

private int csNum

s

private Scope s
Constructor Detail

CSTree

public CSTree(org.antlr.runtime.Token payload)
Method Detail

emitCode

public void emitCode(ClassGenerator classGenerator)
Overrides:
emitCode in class CMTree

getCsNum

public Object getCsNum()

getRequiredStack

public int getRequiredStack()
Overrides:
getRequiredStack in class CMTree

getScope

public Scope getScope()
Specified by:
getScope in interface ScopeNode

getScopeNumber

public int getScopeNumber()
Specified by:
getScopeNumber in interface ScopeNode

setScope

public void setScope(Scope s)
Specified by:
setScope in interface ScopeNode