public class ANTLRTreePrinter extends antlr.TreeParser implements ANTLRTreePrinterTokenTypes
Modifier and Type | Field and Description |
---|---|
static String[] |
_tokenNames |
protected StringBuffer |
buf |
protected Grammar |
grammar |
protected boolean |
showActions |
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth
ACTION, ACTION_CHAR_LITERAL, ACTION_ESC, ACTION_STRING_LITERAL, ALT, AMPERSAND, ARG, ARG_ACTION, ARGLIST, ASSIGN, BACKTRACK_SEMPRED, BANG, BLOCK, CHAR_LITERAL, CHAR_RANGE, CLOSE_ELEMENT_OPTION, CLOSURE, COLON, COMBINED_GRAMMAR, COMMA, COMMENT, DIGIT, DOC_COMMENT, DOLLAR, DOT, DOUBLE_ANGLE_STRING_LITERAL, DOUBLE_QUOTE_STRING_LITERAL, EOA, EOB, EOF, EOR, EPSILON, ESC, ETC, FORCED_ACTION, FRAGMENT, GATED_SEMPRED, ID, IMPLIES, IMPORT, INITACTION, INT, INTERNAL_RULE_REF, LABEL, LEXER, LEXER_GRAMMAR, LITERAL_catch, LITERAL_finally, LITERAL_grammar, LITERAL_lexer, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_returns, LITERAL_throws, LITERAL_tree, LPAREN, ML_COMMENT, NESTED_ACTION, NESTED_ARG_ACTION, NOT, NULL_TREE_LOOKAHEAD, OPEN_ELEMENT_OPTION, OPTIONAL, OPTIONS, OR, PARSER, PARSER_GRAMMAR, PLUS, PLUS_ASSIGN, POSITIVE_CLOSURE, QUESTION, RANGE, RCURLY, RET, REWRITE, ROOT, RPAREN, RULE, RULE_REF, SCOPE, SEMI, SEMPRED, SL_COMMENT, SRC, STAR, STRAY_BRACKET, STRING_LITERAL, SYN_SEMPRED, SYNPRED, TEMPLATE, TOKEN_REF, TOKENS, TREE_BEGIN, TREE_GRAMMAR, WILDCARD, WS, WS_LOOP, WS_OPT, XDIGIT
Constructor and Description |
---|
ANTLRTreePrinter() |
Modifier and Type | Method and Description |
---|---|
void |
action(antlr.collections.AST _t) |
void |
actions(antlr.collections.AST _t) |
void |
alternative(antlr.collections.AST _t) |
void |
ast_suffix(antlr.collections.AST _t) |
void |
atom(antlr.collections.AST _t) |
void |
attrScope(antlr.collections.AST _t) |
void |
block(antlr.collections.AST _t,
boolean forceParens) |
int |
countAltsForBlock(antlr.collections.AST _t) |
void |
delegateGrammars(antlr.collections.AST _t) |
void |
ebnf(antlr.collections.AST _t) |
void |
element(antlr.collections.AST _t) |
void |
exceptionGroup(antlr.collections.AST _t) |
void |
exceptionHandler(antlr.collections.AST _t) |
void |
finallyClause(antlr.collections.AST _t) |
void |
grammar(antlr.collections.AST _t) |
void |
grammarSpec(antlr.collections.AST _t,
String gtype) |
void |
modifier(antlr.collections.AST _t) |
static String |
normalize(String g)
Normalize a grammar print out by removing all double spaces
and trailing/beginning stuff.
|
void |
option(antlr.collections.AST _t) |
void |
optionsSpec(antlr.collections.AST _t) |
void |
optionValue(antlr.collections.AST _t) |
void |
out(String s) |
void |
reportError(antlr.RecognitionException ex) |
void |
rewrite_template(antlr.collections.AST _t) |
void |
rewrite(antlr.collections.AST _t) |
void |
rule(antlr.collections.AST _t) |
void |
ruleAction(antlr.collections.AST _t) |
void |
rules(antlr.collections.AST _t) |
void |
ruleScopeSpec(antlr.collections.AST _t) |
void |
single_rewrite(antlr.collections.AST _t) |
void |
tokenSpec(antlr.collections.AST _t) |
void |
tokensSpec(antlr.collections.AST _t) |
String |
toString(antlr.collections.AST _t,
Grammar g,
boolean showActions)
Call this to figure out how to print
|
void |
tree(antlr.collections.AST _t) |
protected Grammar grammar
protected boolean showActions
protected StringBuffer buf
public static final String[] _tokenNames
public void out(String s)
public void reportError(antlr.RecognitionException ex)
reportError
in class antlr.TreeParser
public static String normalize(String g)
public final String toString(antlr.collections.AST _t, Grammar g, boolean showActions) throws antlr.RecognitionException
antlr.RecognitionException
public final void grammar(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rule(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void alternative(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void element(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void single_rewrite(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void grammarSpec(antlr.collections.AST _t, String gtype) throws antlr.RecognitionException
antlr.RecognitionException
public final void attrScope(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void optionsSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void delegateGrammars(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void tokensSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void actions(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rules(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void action(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void option(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void optionValue(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void tokenSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void modifier(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ruleScopeSpec(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ruleAction(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void block(antlr.collections.AST _t, boolean forceParens) throws antlr.RecognitionException
antlr.RecognitionException
public final void exceptionGroup(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rewrite(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final int countAltsForBlock(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void exceptionHandler(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void finallyClause(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void rewrite_template(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void atom(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ebnf(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void tree(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
public final void ast_suffix(antlr.collections.AST _t) throws antlr.RecognitionException
antlr.RecognitionException
Copyright © 2020. All rights reserved.