Package org.antlr.v4.gui
Class Trees
- java.lang.Object
-
- org.antlr.v4.gui.Trees
-
public class Trees extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetPS(Tree t, List<String> ruleNames)static StringgetPS(Tree t, List<String> ruleNames, String fontName, int fontSize)static Future<JFrame>inspect(Tree t, List<String> ruleNames)Call this method to view a parse tree in a dialog box visually.static Future<JFrame>inspect(Tree t, Parser parser)Call this method to view a parse tree in a dialog box visually.static voidsave(Tree t, List<String> ruleNames, String fileName)Save this tree in a postscript filestatic voidsave(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize)Save this tree in a postscript file using a particular font name and sizestatic voidsave(Tree t, Parser parser, String fileName)Save this tree in a postscript filestatic voidsave(Tree t, Parser parser, String fileName, String fontName, int fontSize)Save this tree in a postscript file using a particular font name and sizestatic StringtoStringTree(Tree t, TreeTextProvider nodeTextProvider)Print out a whole tree in LISP form.static voidwritePS(Tree t, List<String> ruleNames, String fileName)static voidwritePS(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize)
-
-
-
Method Detail
-
inspect
public static Future<JFrame> inspect(Tree t, List<String> ruleNames)
Call this method to view a parse tree in a dialog box visually.
-
inspect
public static Future<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, String fileName) throws IOException, PrintException
Save this tree in a postscript file- Throws:
IOExceptionPrintException
-
save
public static void save(Tree t, Parser parser, String fileName, String fontName, int fontSize) throws IOException
Save this tree in a postscript file using a particular font name and size- Throws:
IOException
-
save
public static void save(Tree t, List<String> ruleNames, String fileName) throws IOException, PrintException
Save this tree in a postscript file- Throws:
IOExceptionPrintException
-
save
public static void save(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize) throws IOException
Save this tree in a postscript file using a particular font name and size- Throws:
IOException
-
writePS
public static void writePS(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize) throws IOException
- Throws:
IOException
-
writePS
public static void writePS(Tree t, List<String> ruleNames, String fileName) throws IOException
- Throws:
IOException
-
toStringTree
public static 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
-
-