ptolemy.actor.ptalon
Class PtalonAST

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by ptolemy.actor.ptalon.PtalonAST
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class PtalonAST
extends antlr.CommonAST

This is just like CommonAST, except it allows XML serialization to be parameterized by a depth.

Since:
Ptolemy II 6.1
Version:
$Id: PtalonAST.java 53095 2009-04-12 19:12:45Z cxh $
Author:
Adam Cataldo, Elaine Cheong
See Also:
Serialized Form
Accepted Rating:
Red (acataldo)
Proposed Rating:
Red (acataldo)

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
PtalonAST()
          Call the default constructor.
PtalonAST(antlr.Token tok)
          Call the default constructor.
 
Method Summary
protected static java.lang.String _getIndentPrefix(int level)
          Return a number of spaces that is proportional to the argument.
 void xmlSerialize(java.io.Writer out, int depth)
          Generate the XML for this AST.
 
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, 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
 

Constructor Detail

PtalonAST

public PtalonAST()
Call the default constructor.


PtalonAST

public PtalonAST(antlr.Token tok)
Call the default constructor.

Parameters:
tok - The token for this node.
Method Detail

xmlSerialize

public void xmlSerialize(java.io.Writer out,
                         int depth)
                  throws java.io.IOException
Generate the XML for this AST.

Parameters:
out - The writer to write to.
depth - The depth of this node.
Throws:
java.io.IOException - If there is any problem writing.

_getIndentPrefix

protected static java.lang.String _getIndentPrefix(int level)
Return a number of spaces that is proportional to the argument. If the argument is negative or zero, return an empty string.

Parameters:
level - The level of indenting represented by the spaces.
Returns:
A string with zero or more spaces.