public class Trees extends Object
Constructor and Description |
---|
Trees() |
Modifier and Type | Method and Description |
---|---|
static List<? extends Tree> |
getAncestors(Tree t)
Return a list of all ancestors of this node.
|
static String |
getNodeText(Tree t,
List<String> ruleNames) |
static String |
getNodeText(Tree t,
Parser recog) |
static String |
getPS(Tree t,
Parser recog) |
static String |
getPS(Tree t,
Parser recog,
String fontName,
int fontSize) |
static String |
toStringTree(Tree t)
Print out a whole tree in LISP form.
|
static String |
toStringTree(Tree t,
List<String> ruleNames)
Print out a whole tree in LISP form.
|
static String |
toStringTree(Tree t,
Parser recog)
Print out a whole tree in LISP form.
|
static void |
writePS(Tree t,
Parser recog,
String fileName) |
static void |
writePS(Tree t,
Parser recog,
String fileName,
String fontName,
int fontSize) |
public static void writePS(Tree t, Parser recog, String fileName, String fontName, int fontSize) throws IOException
IOException
public static void writePS(Tree t, Parser recog, String fileName) throws IOException
IOException
public static String toStringTree(@NotNull Tree t)
getNodeText(org.antlr.v4.runtime.tree.Tree, org.antlr.v4.runtime.Parser)
is used on the
node payloads to get the text for the nodes. Detect
parse trees and extract data appropriately.public static String toStringTree(@NotNull Tree t, @Nullable Parser recog)
getNodeText(org.antlr.v4.runtime.tree.Tree, org.antlr.v4.runtime.Parser)
is used on the
node payloads to get the text for the nodes. Detect
parse trees and extract data appropriately.public static String toStringTree(@NotNull Tree t, @Nullable List<String> ruleNames)
getNodeText(org.antlr.v4.runtime.tree.Tree, org.antlr.v4.runtime.Parser)
is used on the
node payloads to get the text for the nodes. Detect
parse trees and extract data appropriately.Copyright © 2012. All Rights Reserved.