Package ptolemy.actor.ptalon
Class PtalonAST
- java.lang.Object
-
- antlr.BaseAST
-
- antlr.CommonAST
-
- 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$
- Author:
- Adam Cataldo, Elaine Cheong
- See Also:
- Serialized Form
- Pt.AcceptedRating:
- Red (acataldo)
- Pt.ProposedRating:
- Red (acataldo)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
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.
-
-