| Modifier and Type | Field and Description |
|---|---|
| private final String[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | ASTPrinter(Class<T>
The token types to use during printing; typically the {vocabulary}TokenTypes.java
interface generated by ANTLR. tokenTypeConstants)Constructs a printer. |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public LinkedHashMap | |
| public static String | |
| public String | Returns: String - The token type name from the token type constant class, or just the integer as a string if none exists.The token type. type)Returns the token type name for the given token type. |
| private void | |
| public String | |
| public String | |
| public String | Returns: The AST in 'ASCII art' form, as a string.The AST to display. ast, String The header for the display. header)Renders the AST into 'ASCII art' form and returns that string representation. |
| public void | showAst(AST
The AST to print. ast, PrintStream The print stream to which the AST should be printed. out)Prints the AST in 'ASCII art' form to the specified print stream. |
| public void | showAst(AST
The AST to print. ast, PrintWriter The print writer to which the AST should be written. pw)Prints the AST in 'ASCII art' tree form to the specified print writer. |
| private void | |
| private void | |
| private void |
| tokenTypeNameCache | back to summary |
|---|---|
| private final String[] tokenTypeNameCache | |
| ASTPrinter | back to summary |
|---|---|
| pack-priv ASTPrinter(Class<T> tokenTypeConstants) Constructs a printer. Package protected: use the constants from {TokenPrinters}
| |
| appendEscapedMultibyteChars | back to summary |
|---|---|
| public static void appendEscapedMultibyteChars(String text, StringBuilder buf) | |
| createNodeProperties | back to summary |
|---|---|
| public LinkedHashMap | |
| escapeMultibyteChars | back to summary |
|---|---|
| public static String escapeMultibyteChars(String text) | |
| getTokenTypeName | back to summary |
|---|---|
| public String getTokenTypeName(int type) Returns the token type name for the given token type.
| |
| indentLine | back to summary |
|---|---|
| private void indentLine(List<AST> parents, PrintWriter pw) | |
| nodeToString | back to summary |
|---|---|
| public String nodeToString(AST ast) | |
| propertyToString | back to summary |
|---|---|
| public String propertyToString(String label, Object value, AST ast) | |
| showAsString | back to summary |
|---|---|
| public String showAsString(AST ast, String header) Renders the AST into 'ASCII art' form and returns that string representation. | |
| showAst | back to summary |
|---|---|
| public void showAst(AST ast, PrintStream out) Prints the AST in 'ASCII art' form to the specified print stream.
| |
| showAst | back to summary |
|---|---|
| public void showAst(AST ast, PrintWriter pw) Prints the AST in 'ASCII art' tree form to the specified print writer.
| |
| showAst | back to summary |
|---|---|
| private void showAst(ArrayList<AST> parents, PrintWriter pw, AST ast) | |
| showNode | back to summary |
|---|---|
| private void showNode(PrintWriter pw, AST ast) | |
| showNodeProperties | back to summary |
|---|---|
| private void showNodeProperties(ArrayList<AST> parents, PrintWriter pw, AST ast) | |