net.sf.jse
Class Template
java.lang.Object
|
+--net.sf.jse.Fragment
|
+--net.sf.jse.CompoundFragment
|
+--net.sf.jse.NestedFragment
|
+--net.sf.jse.Template
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Template
- extends NestedFragment
A #{ } nested fragment used for code quotes
- Version:
- 0.9, 03OCT00
- Author:
- Jonathan Bachrach, Keith Playford
Methods inherited from class net.sf.jse.Fragment |
capitalize, die, generatePatternCode, getChar, getCurrentLine, getFloat, getInt, getLine, getString, getValue, isTerminator, makeToken, makeToken, setCurrentLine |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Template
public Template(FragmentList fragments)
Template
public Template(antlr.Token left,
FragmentList fragments,
antlr.Token right)
tokens
public List tokens()
- Overrides:
tokens
in class NestedFragment
expandTemplates
public Fragment expandTemplates()
- Overrides:
expandTemplates
in class NestedFragment
compileTemplate
public Fragment compileTemplate(int depth)
- Description copied from class:
Fragment
- Template code generator -- probably should be compileTemplateElement
- Overrides:
compileTemplate
in class NestedFragment
- Following copied from class:
net.sf.jse.Fragment
- See Also:
compileTemplate(int)
compileQuestionExpression
public Fragment compileQuestionExpression(int tDepth,
int qDepth)
- Overrides:
compileQuestionExpression
in class Fragment
compilePattern
public Expansion compilePattern(Fragment expression,
IdentifierFragment endVar)
markMacros
public Fragment markMacros(MacroExpander expander)
- Overrides:
markMacros
in class NestedFragment
expandMacros
public Fragment expandMacros(MacroExpander expander,
boolean isRecursive)
- Overrides:
expandMacros
in class NestedFragment
processTemplate
public static Expansion processTemplate(FragmentList fragments)
processNestedTemplate
public static Template processNestedTemplate(FragmentList fragments)
substituteIdentifier
public static IdentifierFragment substituteIdentifier(java.lang.String name)
substitutePatternVariable
public static PatternVariableFragment substitutePatternVariable(java.lang.String name)
substituteDot
public static DotFragment substituteDot()
substituteComma
public static CommaFragment substituteComma()
substituteSemicolon
public static SemicolonFragment substituteSemicolon()
substituteQuestion
public static QuestionFragment substituteQuestion()
processParens
public static ParensFragment processParens(FragmentList fragments)
processBraces
public static BracesFragment processBraces(FragmentList fragments)
processBrackets
public static BracketsFragment processBrackets(FragmentList fragments)
processQuestionExpression
public static QuestionExpressionFragment processQuestionExpression(FragmentList fragments)
processQuestionExpression
public static QuestionExpressionFragment processQuestionExpression(Fragment fragment)
substituteAsString
public static StringFragment substituteAsString(java.lang.String string)
substituteAsInteger
public static IntegerFragment substituteAsInteger(java.lang.Integer x)
substituteAsInteger
public static IntegerFragment substituteAsInteger(int x)
substituteAsFloat
public static FloatFragment substituteAsFloat(java.lang.Float x)
substituteAsFloat
public static FloatFragment substituteAsFloat(float x)