Top Inners Fields Constructors Methods
org.antlr.stringtemplate.language

public Class ActionEvaluator

extends TreeParser
implements ActionEvaluatorTokenTypes
Class Inheritance
All Implemented Interfaces
org.antlr.stringtemplate.language.ActionEvaluatorTokenTypes
Imports
org.antlr.stringtemplate.*, java.util.*, java.io.*, java.lang.reflect.*, antlr.TreeParser, .Token, .RecognitionException, .ANTLRException, .NoViableAltException, .MismatchedTokenException, .SemanticException, .ASTPair, antlr.collections.AST, antlr.collections.impl.BitSet, .ASTArray

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final String[]
public static final BitSet
protected ASTExpr
protected StringTemplateWriter
protected StringTemplate
Inherited from antlr.TreeParser:
_retTreeastFactoryASTNULLinputStatereturnASTtokenNamestraceDepth

Constructor Summary

AccessConstructor and Description
public
ActionEvaluator(StringTemplate self, ASTExpr chunk, StringTemplateWriter out)

Create an evaluator using attributes from self

public

Method Summary

Modifier and TypeMethod and Description
public final int
action(AST _t)

public final Map<K, V>
argList(AST _t, StringTemplate embedded, Map<K, V> 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).

public final void
argumentAssignment(AST _t, StringTemplate embedded, Map<K, V> argumentContext)

public final Object
public final Object
expr(AST _t)

public final Object
public final Object
ifAtom(AST _t)

public final boolean
public final Object
list(AST _t)

create a new list of expressions as a new multi-value attribute

private static final long[]
public void
reportError(RecognitionException e)

Overrides antlr.TreeParser.reportError.

Parser error-reporting function can be overridden in subclass
public final Object
public final void
singleTemplateArg(AST _t, StringTemplate embedded, Map<K, V> argumentContext)

public final void
template(AST _t, Vector<E> templatesToApply)

public final Object
templateApplication(AST _t)

Apply template(s) to an attribute; can be applied to another apply result.

public final Object
Inherited from antlr.TreeParser:
getASTgetASTFactorygetTokenNamegetTokenNamesmatchmatchmatchNotpanicreportErrorreportWarningsetASTFactorysetASTNodeClasssetASTNodeTypetraceIntraceIndenttraceOut

Field Detail

_tokenNamesback to summary
public static final String[] _tokenNames
_tokenSet_0back to summary
public static final BitSet _tokenSet_0
chunkback to summary
protected ASTExpr chunk
outback to summary
protected StringTemplateWriter out
selfback to summary
protected StringTemplate self

Constructor Detail

ActionEvaluatorback to summary
public ActionEvaluator(StringTemplate self, ASTExpr chunk, StringTemplateWriter out)

Create an evaluator using attributes from self

ActionEvaluatorback to summary
public ActionEvaluator()

Method Detail

actionback to summary
public final int action(AST _t) throws RecognitionException
argListback to summary
public final Map<K, V> argList(AST _t, StringTemplate embedded, Map<K, V> 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.

argumentAssignmentback to summary
public final void argumentAssignment(AST _t, StringTemplate embedded, Map<K, V> argumentContext) throws RecognitionException
attributeback to summary
public final Object attribute(AST _t) throws RecognitionException
exprback to summary
public final Object expr(AST _t) throws RecognitionException
functionback to summary
public final Object function(AST _t) throws RecognitionException
ifAtomback to summary
public final Object ifAtom(AST _t) throws RecognitionException
ifConditionback to summary
public final boolean ifCondition(AST _t) throws RecognitionException
listback to summary
public final Object list(AST _t) throws RecognitionException

create a new list of expressions as a new multi-value attribute

mk_tokenSet_0back to summary
private static final long[] mk_tokenSet_0()
reportErrorback to summary
public void reportError(RecognitionException e)

Overrides antlr.TreeParser.reportError.

Doc from antlr.TreeParser.reportError.

Parser error-reporting function can be overridden in subclass

singleFunctionArgback to summary
public final Object singleFunctionArg(AST _t) throws RecognitionException
singleTemplateArgback to summary
public final void singleTemplateArg(AST _t, StringTemplate embedded, Map<K, V> argumentContext) throws RecognitionException
templateback to summary
public final void template(AST _t, Vector<E> templatesToApply) throws RecognitionException
templateApplicationback to summary
public final Object templateApplication(AST _t) throws RecognitionException

Apply template(s) to an attribute; can be applied to another apply result.

templateIncludeback to summary
public final Object templateInclude(AST _t) throws RecognitionException
org.antlr.stringtemplate.language back to summary

public Class ActionEvaluator.NameValuePair

extends Object
Class Inheritance
  • java.lang.Object
  • org.antlr.stringtemplate.language.ActionEvaluator.NameValuePair

Field Summary

Modifier and TypeField and Description
public String
public Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
public String name
valueback to summary
public Object value

Constructor Detail

NameValuePairback to summary
public NameValuePair()