Package org.antlr.v4.gui
Class Trees
- java.lang.Object
-
- org.antlr.v4.gui.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 filestatic 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 sizestatic void
save(Tree t, Parser parser, java.lang.String fileName)
Save this tree in a postscript filestatic 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 sizestatic 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)
-
-
-
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
-
-