org.antlr.stringtemplate.language
Class StringTemplateLanguageEvaluator

java.lang.Object
  extended byantlr.TreeParser
      extended byorg.antlr.stringtemplate.language.StringTemplateLanguageEvaluator
All Implemented Interfaces:
StringTemplateLanguageEvaluatorTokenTypes

public class StringTemplateLanguageEvaluator
extends antlr.TreeParser
implements StringTemplateLanguageEvaluatorTokenTypes


Nested Class Summary
static class StringTemplateLanguageEvaluator.NameValuePair
           
 
Field Summary
static java.lang.String[] _tokenNames
           
 
Fields inherited from class antlr.TreeParser
ASTNULL
 
Fields inherited from interface org.antlr.stringtemplate.language.StringTemplateLanguageEvaluatorTokenTypes
ANONYMOUS_TEMPLATE, APPLY, ARGS, ASSIGN, COLON, COMMA, CONDITIONAL, DOT, EOF, ESC_CHAR, ID, INCLUDE, INT, LITERAL_separator, LPAREN, NESTED_ANONYMOUS_TEMPLATE, NOT, NULL_TREE_LOOKAHEAD, PLUS, RPAREN, SEMI, STRING, TEMPLATE, VALUE, WS
 
Constructor Summary
StringTemplateLanguageEvaluator()
           
StringTemplateLanguageEvaluator(StringTemplate self, ASTExpr chunk, java.io.Writer out)
          Create an evaluator using attributes from self
 
Method Summary
 void action(antlr.collections.AST _t)
           
 java.util.Map argList(antlr.collections.AST _t, java.util.Map initialContext)
           
 void argumentAssignment(antlr.collections.AST _t, java.util.Map argumentContext)
           
 java.lang.Object attribute(antlr.collections.AST _t)
           
 java.lang.Object expr(antlr.collections.AST _t)
           
 java.lang.Object ifAtom(antlr.collections.AST _t)
           
 boolean ifCondition(antlr.collections.AST _t)
           
 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)
           
 
Methods inherited from class antlr.TreeParser
getAST, getASTFactory, getTokenName, getTokenNames, match, panic, reportError, reportError, reportWarning, setASTFactory, setASTNodeClass, setASTNodeType, traceIn, traceIndent, traceOut
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tokenNames

public static final java.lang.String[] _tokenNames
Constructor Detail

StringTemplateLanguageEvaluator

public StringTemplateLanguageEvaluator(StringTemplate self,
                                       ASTExpr chunk,
                                       java.io.Writer out)
Create an evaluator using attributes from self


StringTemplateLanguageEvaluator

public StringTemplateLanguageEvaluator()
Method Detail

action

public final void action(antlr.collections.AST _t)
                  throws antlr.RecognitionException
Throws:
antlr.RecognitionException

expr

public final java.lang.Object expr(antlr.collections.AST _t)
                            throws antlr.RecognitionException
Throws:
antlr.RecognitionException

templateApplication

public final java.lang.Object templateApplication(antlr.collections.AST _t)
                                           throws antlr.RecognitionException
Apply template(s) to an attribute; can be applied to another apply result. I am not too efficient here as I write to a StringWriter and then dump for the common case, but I'll fix later.

Throws:
antlr.RecognitionException

attribute

public final java.lang.Object attribute(antlr.collections.AST _t)
                                 throws antlr.RecognitionException
Throws:
antlr.RecognitionException

templateInclude

public final java.lang.Object templateInclude(antlr.collections.AST _t)
                                       throws antlr.RecognitionException
Throws:
antlr.RecognitionException

argList

public final java.util.Map argList(antlr.collections.AST _t,
                                   java.util.Map initialContext)
                            throws antlr.RecognitionException
Throws:
antlr.RecognitionException

template

public final void template(antlr.collections.AST _t,
                           java.util.Vector templatesToApply)
                    throws antlr.RecognitionException
Throws:
antlr.RecognitionException

ifCondition

public final boolean ifCondition(antlr.collections.AST _t)
                          throws antlr.RecognitionException
Throws:
antlr.RecognitionException

ifAtom

public final java.lang.Object ifAtom(antlr.collections.AST _t)
                              throws antlr.RecognitionException
Throws:
antlr.RecognitionException

argumentAssignment

public final void argumentAssignment(antlr.collections.AST _t,
                                     java.util.Map argumentContext)
                              throws antlr.RecognitionException
Throws:
antlr.RecognitionException