Class 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)
    • Field Summary

      • Fields inherited from class antlr.BaseAST

        down, right
    • Constructor Summary

      Constructors 
      Constructor Description
      PtalonAST()
      Call the default constructor.
      PtalonAST​(antlr.Token tok)
      Call the default constructor.
    • 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
      • 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.