ActionEvaluatorTokenTypespublic class ActionEvaluator extends antlr.TreeParser implements ActionEvaluatorTokenTypes
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ActionEvaluator.NameValuePair |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String[] |
_tokenNames |
|
static antlr.collections.impl.BitSet |
_tokenSet_0 |
|
protected ASTExpr |
chunk |
|
protected StringTemplateWriter |
out |
|
protected StringTemplate |
self |
ANONYMOUS_TEMPLATE, APPLY, ARGS, ASSIGN, COLON, COMMA, CONDITIONAL, DOT, DOTDOTDOT, EOF, ESC_CHAR, FUNCTION, ID, INCLUDE, INT, LBRACK, LIST, LITERAL_elseif, LITERAL_first, LITERAL_last, LITERAL_length, LITERAL_rest, LITERAL_strip, LITERAL_super, LITERAL_trunc, LPAREN, MULTI_APPLY, NESTED_ANONYMOUS_TEMPLATE, NOT, NOTHING, NULL_TREE_LOOKAHEAD, PLUS, RBRACK, RPAREN, SEMI, SINGLEVALUEARG, STRING, TEMPLATE, TEMPLATE_ARGS, VALUE, WS, WS_CHAR| Constructor | Description |
|---|---|
ActionEvaluator() |
|
ActionEvaluator(StringTemplate self,
ASTExpr chunk,
StringTemplateWriter out) |
Create an evaluator using attributes from self
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
action(antlr.collections.AST _t) |
|
java.util.Map |
argList(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map initialContext) |
self is assumed to be the enclosing context as foo(x=y) must find y in
the template that encloses the ref to foo(x=y).
|
void |
argumentAssignment(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map argumentContext) |
|
java.lang.Object |
attribute(antlr.collections.AST _t) |
|
java.lang.Object |
expr(antlr.collections.AST _t) |
|
java.lang.Object |
function(antlr.collections.AST _t) |
|
java.lang.Object |
ifAtom(antlr.collections.AST _t) |
|
boolean |
ifCondition(antlr.collections.AST _t) |
|
java.lang.Object |
list(antlr.collections.AST _t) |
create a new list of expressions as a new multi-value attribute
|
void |
reportError(antlr.RecognitionException e) |
|
java.lang.Object |
singleFunctionArg(antlr.collections.AST _t) |
|
void |
singleTemplateArg(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map argumentContext) |
|
void |
template(antlr.collections.AST _t,
java.util.Vector templatesToApply) |
|
java.lang.Object |
templateApplication(antlr.collections.AST _t) |
Apply template(s) to an attribute; can be applied to another apply
result.
|
java.lang.Object |
templateInclude(antlr.collections.AST _t) |
protected StringTemplate self
protected StringTemplateWriter out
protected ASTExpr chunk
public static final java.lang.String[] _tokenNames
public static final antlr.collections.impl.BitSet _tokenSet_0
public ActionEvaluator(StringTemplate self, ASTExpr chunk, StringTemplateWriter out)
public ActionEvaluator()
public void reportError(antlr.RecognitionException e)
reportError in class antlr.TreeParserpublic final int action(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object expr(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object templateApplication(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object attribute(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object templateInclude(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object function(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object list(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final void template(antlr.collections.AST _t,
java.util.Vector templatesToApply)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object singleFunctionArg(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final boolean ifCondition(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.lang.Object ifAtom(antlr.collections.AST _t)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final java.util.Map argList(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map initialContext)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final void argumentAssignment(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map argumentContext)
throws antlr.RecognitionException
antlr.RecognitionExceptionpublic final void singleTemplateArg(antlr.collections.AST _t,
StringTemplate embedded,
java.util.Map argumentContext)
throws antlr.RecognitionException
antlr.RecognitionExceptionCopyright ? 2006-2017 Terence Parr