Class Trees


  • public class Trees
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPS​(Tree t, java.util.List<java.lang.String> ruleNames)  
      static java.lang.String getPS​(Tree t, java.util.List<java.lang.String> ruleNames, java.lang.String fontName, int fontSize)  
      static java.util.concurrent.Future<javax.swing.JFrame> inspect​(Tree t, java.util.List<java.lang.String> ruleNames)
      Call this method to view a parse tree in a dialog box visually.
      static java.util.concurrent.Future<javax.swing.JFrame> inspect​(Tree t, Parser parser)
      Call this method to view a parse tree in a dialog box visually.
      static void save​(Tree t, java.util.List<java.lang.String> ruleNames, java.lang.String fileName)
      Save this tree in a postscript file
      static void save​(Tree t, java.util.List<java.lang.String> ruleNames, java.lang.String fileName, java.lang.String fontName, int fontSize)
      Save this tree in a postscript file using a particular font name and size
      static void save​(Tree t, Parser parser, java.lang.String fileName)
      Save this tree in a postscript file
      static void save​(Tree t, Parser parser, java.lang.String fileName, java.lang.String fontName, int fontSize)
      Save this tree in a postscript file using a particular font name and size
      static java.lang.String toStringTree​(Tree t, TreeTextProvider nodeTextProvider)
      Print out a whole tree in LISP form.
      static void writePS​(Tree t, java.util.List<java.lang.String> ruleNames, java.lang.String fileName)  
      static void writePS​(Tree t, java.util.List<java.lang.String> ruleNames, java.lang.String fileName, java.lang.String fontName, int fontSize)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • inspect

        public static java.util.concurrent.Future<javax.swing.JFrame> inspect​(Tree t,
                                                                              java.util.List<java.lang.String> ruleNames)
        Call this method to view a parse tree in a dialog box visually.
      • inspect

        public static java.util.concurrent.Future<javax.swing.JFrame> inspect​(Tree t,
                                                                              Parser parser)
        Call this method to view a parse tree in a dialog box visually.
      • save

        public static void save​(Tree t,
                                Parser parser,
                                java.lang.String fileName)
                         throws java.io.IOException,
                                javax.print.PrintException
        Save this tree in a postscript file
        Throws:
        java.io.IOException
        javax.print.PrintException
      • save

        public static void save​(Tree t,
                                Parser parser,
                                java.lang.String fileName,
                                java.lang.String fontName,
                                int fontSize)
                         throws java.io.IOException
        Save this tree in a postscript file using a particular font name and size
        Throws:
        java.io.IOException
      • save

        public static void save​(Tree t,
                                java.util.List<java.lang.String> ruleNames,
                                java.lang.String fileName)
                         throws java.io.IOException,
                                javax.print.PrintException
        Save this tree in a postscript file
        Throws:
        java.io.IOException
        javax.print.PrintException
      • save

        public static void save​(Tree t,
                                java.util.List<java.lang.String> ruleNames,
                                java.lang.String fileName,
                                java.lang.String fontName,
                                int fontSize)
                         throws java.io.IOException
        Save this tree in a postscript file using a particular font name and size
        Throws:
        java.io.IOException
      • getPS

        public static java.lang.String getPS​(Tree t,
                                             java.util.List<java.lang.String> ruleNames,
                                             java.lang.String fontName,
                                             int fontSize)
      • getPS

        public static java.lang.String getPS​(Tree t,
                                             java.util.List<java.lang.String> ruleNames)
      • writePS

        public static void writePS​(Tree t,
                                   java.util.List<java.lang.String> ruleNames,
                                   java.lang.String fileName,
                                   java.lang.String fontName,
                                   int fontSize)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • writePS

        public static void writePS​(Tree t,
                                   java.util.List<java.lang.String> ruleNames,
                                   java.lang.String fileName)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • toStringTree

        public static java.lang.String toStringTree​(Tree t,
                                                    TreeTextProvider nodeTextProvider)
        Print out a whole tree in LISP form. Arg nodeTextProvider is used on the node payloads to get the text for the nodes.
        Since:
        4.5.1