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 String
getPS(Tree t, List<String> ruleNames)
static String
getPS(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 void
save(Tree t, List<String> ruleNames, String fileName)
Save this tree in a postscript filestatic 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 sizestatic void
save(Tree t, Parser parser, String fileName)
Save this tree in a postscript filestatic 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 sizestatic String
toStringTree(Tree t, TreeTextProvider nodeTextProvider)
Print out a whole tree in LISP form.static void
writePS(Tree t, List<String> ruleNames, String fileName)
static void
writePS(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:
IOException
PrintException
-
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:
IOException
PrintException
-
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
-
-