org.antlr.stringtemplate.language
Class ActionEvaluator
java.lang.Object
antlr.TreeParser
org.antlr.stringtemplate.language.ActionEvaluator
- All Implemented Interfaces:
- ActionEvaluatorTokenTypes
public class ActionEvaluator
- extends antlr.TreeParser
- implements ActionEvaluatorTokenTypes
Fields inherited from interface org.antlr.stringtemplate.language.ActionEvaluatorTokenTypes |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
self
protected StringTemplate self
out
protected StringTemplateWriter out
chunk
protected ASTExpr chunk
_tokenNames
public static final java.lang.String[] _tokenNames
_tokenSet_0
public static final java.util.BitSet _tokenSet_0
ActionEvaluator
public ActionEvaluator(StringTemplate self,
ASTExpr chunk,
StringTemplateWriter out)
- Create an evaluator using attributes from self
ActionEvaluator
public ActionEvaluator()
reportError
public void reportError(RecognitionException e)
action
public final int action(AST _t)
throws RecognitionException
- Throws:
RecognitionException
expr
public final java.lang.Object expr(AST _t)
throws RecognitionException
- Throws:
RecognitionException
templateApplication
public final java.lang.Object templateApplication(AST _t)
throws RecognitionException
- Apply template(s) to an attribute; can be applied to another apply
result.
- Throws:
RecognitionException
attribute
public final java.lang.Object attribute(AST _t)
throws RecognitionException
- Throws:
RecognitionException
templateInclude
public final java.lang.Object templateInclude(AST _t)
throws RecognitionException
- Throws:
RecognitionException
function
public final java.lang.Object function(AST _t)
throws RecognitionException
- Throws:
RecognitionException
list
public final java.lang.Object list(AST _t)
throws RecognitionException
- create a new list of expressions as a new multi-value attribute
- Throws:
RecognitionException
template
public final void template(AST _t,
java.util.Vector templatesToApply)
throws RecognitionException
- Throws:
RecognitionException
singleFunctionArg
public final java.lang.Object singleFunctionArg(AST _t)
throws RecognitionException
- Throws:
RecognitionException
ifCondition
public final boolean ifCondition(AST _t)
throws RecognitionException
- Throws:
RecognitionException
ifAtom
public final java.lang.Object ifAtom(AST _t)
throws RecognitionException
- Throws:
RecognitionException
argList
public final java.util.Map argList(AST _t,
StringTemplate embedded,
java.util.Map initialContext)
throws RecognitionException
- 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). We must pass in
the embedded template (the one invoked) so we can check formal args
in rawSetArgumentAttribute.
- Throws:
RecognitionException
argumentAssignment
public final void argumentAssignment(AST _t,
StringTemplate embedded,
java.util.Map argumentContext)
throws RecognitionException
- Throws:
RecognitionException
singleTemplateArg
public final void singleTemplateArg(AST _t,
StringTemplate embedded,
java.util.Map argumentContext)
throws RecognitionException
- Throws:
RecognitionException