modesteditor.core.antlrparser
Class ModestAST

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by modesteditor.core.antlrparser.ModestAST
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class ModestAST
extends antlr.CommonAST

This is the AST class that will be used in the AST such that the TreeWalker has access to line and column information. CommonAST(default) from Antlr does not store line information. So we extend it, so use setASTNodeClass() to set it up in parser.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
ModestAST()
           
 
Method Summary
 int getColumn()
           
 int getLine()
           
 java.lang.String getProcName()
           
 Symbol getSymbol()
           
 java.lang.String getSymbolType()
           
 java.lang.String getTypeKind()
          In case of a process definition, return the kind (either set, range or struct)
 double getWeight()
           
 void initialize(antlr.collections.AST ast)
           
 void initialize(antlr.Token tok)
           
 boolean isUrgent()
           
 void setColumn(int column)
           
 void setGuardType(boolean urgent)
          Set in the case of a GUARD_AST urgent flag
 void setLine(int line)
           
 void setProcName(java.lang.String procName)
           
 void setSymbol(Symbol sym)
           
 void setSymbolType(java.lang.String st)
           
 void setTypeKind(java.lang.String typeKind)
           
 void setWeight(double weight)
           
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, 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
 

Constructor Detail

ModestAST

public ModestAST()
Method Detail

initialize

public void initialize(antlr.Token tok)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class antlr.CommonAST

initialize

public void initialize(antlr.collections.AST ast)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class antlr.CommonAST

getLine

public int getLine()
Specified by:
getLine in interface antlr.collections.AST
Overrides:
getLine in class antlr.BaseAST

getColumn

public int getColumn()
Specified by:
getColumn in interface antlr.collections.AST
Overrides:
getColumn in class antlr.BaseAST

getSymbol

public Symbol getSymbol()

setSymbol

public void setSymbol(Symbol sym)

getSymbolType

public java.lang.String getSymbolType()

setSymbolType

public void setSymbolType(java.lang.String st)

setLine

public void setLine(int line)

setColumn

public void setColumn(int column)

setGuardType

public void setGuardType(boolean urgent)
Set in the case of a GUARD_AST urgent flag


isUrgent

public boolean isUrgent()

getWeight

public double getWeight()
Returns:
the weight

setWeight

public void setWeight(double weight)
Parameters:
weight - the weight to set

getTypeKind

public java.lang.String getTypeKind()
In case of a process definition, return the kind (either set, range or struct)

Returns:
the typeKind

setTypeKind

public void setTypeKind(java.lang.String typeKind)
Parameters:
typeKind - the typeKind to set

getProcName

public java.lang.String getProcName()
Returns:
the procName

setProcName

public void setProcName(java.lang.String procName)
Parameters:
procName - the procName to set