jparse.stmt
Class BreakAST

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.CommonAST
          extended byantlr.CommonASTWithHiddenTokens
              extended byjparse.JavaAST
                  extended byjparse.stmt.StatementAST
                      extended byjparse.stmt.BreakAST
All Implemented Interfaces:
antlr.collections.AST, HasExceptions, Serializable

public final class BreakAST
extends StatementAST

An AST node that represents a break statement

Author:
Jerry James
See Also:
Serialized Form

Field Summary
private  IdentifierAST label
          The break label
 
Fields inherited from class jparse.stmt.StatementAST
control, exceptions, next, nonlocal
 
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
BreakAST(antlr.Token token)
          Create a new break statement AST
 
Method Summary
protected  StatementAST[] computeControl()
          Compute the list of points to which control might flow after this statement
protected  Type[] computeExceptions()
          Compute the checked exception types that might be thrown by this statement
 IdentifierAST getLabel()
          Get the label to break to
 VarList getVarList()
          Get the list of variables read, written, and declared by this statement
 void parseComplete()
          Compute any derived attributes that must be evaluated after the initial parse.
 
Methods inherited from class jparse.stmt.StatementAST
getExceptionTypes, nextControlPoints
 
Methods inherited from class jparse.JavaAST
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

label

private IdentifierAST label
The break label

Constructor Detail

BreakAST

public BreakAST(antlr.Token token)
Create a new break statement AST

Parameters:
token - the token represented by this AST node
Method Detail

parseComplete

public void parseComplete()
Description copied from class: JavaAST
Compute any derived attributes that must be evaluated after the initial parse. The default action is to just tell your children that the parse is complete.

Overrides:
parseComplete in class StatementAST

computeExceptions

protected Type[] computeExceptions()
Description copied from class: StatementAST
Compute the checked exception types that might be thrown by this statement

Specified by:
computeExceptions in class StatementAST
Returns:
an array of types representing the exceptions that this statement might throw

computeControl

protected StatementAST[] computeControl()
Description copied from class: StatementAST
Compute the list of points to which control might flow after this statement

Specified by:
computeControl in class StatementAST
Returns:
a list of statements to which control might pass from this one

getVarList

public VarList getVarList()
Description copied from class: StatementAST
Get the list of variables read, written, and declared by this statement

Specified by:
getVarList in class StatementAST
Returns:
the list of variables read, written, and declared by this statement

getLabel

public IdentifierAST getLabel()
Get the label to break to

Returns:
the label, or null if there is not one