public class Visualizer
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static <NT extends java.lang.Enum<NT>> |
showInBrowser(ParseTree<NT> parseTree) |
Tries to show a visualization of a parse tree in your web browser.
|
static <NT extends java.lang.Enum<NT>> |
writeToFile(ParseTree<NT> parseTree,
java.lang.String filename) |
Generate an HTML visualization of the parse tree and write it to a file.
|
public static <NT extends java.lang.Enum<NT>> void showInBrowser(ParseTree<NT> parseTree)
NT
- the enumeration of symbols in the parse tree's grammarparseTree
- tree to visualizepublic static <NT extends java.lang.Enum<NT>> void writeToFile(ParseTree<NT> parseTree, java.lang.String filename) throws java.io.IOException
NT
- the enumeration of symbols in the parse tree's grammarparseTree
- tree to visualizefilename
- output file. Advisable to give it ".html" extension, though not required.java.io.IOException
- if unable to write the file.