Top Constructors Methods
org.antlr.v4.gui

public Class Trees

extends Object
Class Inheritance
Imports
org.antlr.v4.runtime.Parser, org.antlr.v4.runtime.misc.Utils, org.antlr.v4.runtime.tree.Tree, javax.print.PrintException, javax.swing.*, java.io.BufferedWriter, .FileWriter, .IOException, java.util.Arrays, .List, java.util.concurrent.Future

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String
getPS(Tree t, List<String> ruleNames, String fontName, int fontSize)

public static String
getPS(Tree t, List<String> ruleNames)

public static Future<JFrame>
inspect(Tree t, List<String> ruleNames)

Call this method to view a parse tree in a dialog box visually.

public static Future<JFrame>
inspect(Tree t, Parser parser)

Call this method to view a parse tree in a dialog box visually.

public static void
save(Tree t, Parser parser, String fileName)

Save this tree in a postscript file

public static void
save(Tree t, Parser parser, String fileName, String fontName, int fontSize)

Save this tree in a postscript file using a particular font name and size

public static void
save(Tree t, List<String> ruleNames, String fileName)

Save this tree in a postscript file

public static void
save(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize)

Save this tree in a postscript file using a particular font name and size

public static String
toStringTree(Tree t, TreeTextProvider nodeTextProvider)

Print out a whole tree in LISP form.

public static void
writePS(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize)

public static void
writePS(Tree t, List<String> ruleNames, String fileName)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Treesback to summary
private Trees()

Method Detail

getPSback to summary
public static String getPS(Tree t, List<String> ruleNames, String fontName, int fontSize)
getPSback to summary
public static String getPS(Tree t, List<String> ruleNames)
inspectback to summary
public static Future<JFrame> inspect(Tree t, List<String> ruleNames)

Call this method to view a parse tree in a dialog box visually.

inspectback to summary
public static Future<JFrame> inspect(Tree t, Parser parser)

Call this method to view a parse tree in a dialog box visually.

saveback to summary
public static void save(Tree t, Parser parser, String fileName) throws IOException, PrintException

Save this tree in a postscript file

saveback to summary
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

saveback to summary
public static void save(Tree t, List<String> ruleNames, String fileName) throws IOException, PrintException

Save this tree in a postscript file

saveback to summary
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

toStringTreeback to summary
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
writePSback to summary
public static void writePS(Tree t, List<String> ruleNames, String fileName, String fontName, int fontSize) throws IOException
writePSback to summary
public static void writePS(Tree t, List<String> ruleNames, String fileName) throws IOException