net.sf.jse
Class QuestionExpressionFragment

java.lang.Object
  |
  +--net.sf.jse.Fragment
        |
        +--net.sf.jse.CompoundFragment
              |
              +--net.sf.jse.NestedFragment
                    |
                    +--net.sf.jse.QuestionExpressionFragment
All Implemented Interfaces:
java.lang.Cloneable

public class QuestionExpressionFragment
extends NestedFragment

A nested fragment representing template code evaluation syntax ?(expression)

Version:
0.9, 03OCT00
Author:
Jonathan Bachrach, Keith Playford

Fields inherited from class net.sf.jse.Fragment
out
 
Constructor Summary
QuestionExpressionFragment(FragmentList children)
           
QuestionExpressionFragment(antlr.Token question, antlr.Token left, FragmentList children, antlr.Token right)
           
 
Method Summary
 Expansion compilePatternElement(FragmentList tail, IdentifierFragment nowVar, IdentifierFragment nextVar)
          Top level entry point to compiling fragments within a pattern
 Fragment compileQuestionExpression(int tDepth, int qDepth)
           
 Fragment compileTemplate(int depth)
          Template code generator -- probably should be compileTemplateElement
 List tokens()
           
 
Methods inherited from class net.sf.jse.NestedFragment
compileNestedPatternElements, expandMacros, expandTemplates, getInsideFragments, getNestedFragments, markMacros, setInsideFragments, toString
 
Methods inherited from class net.sf.jse.CompoundFragment
collectBoundVariables, compileNestedTemplate
 
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
 

Constructor Detail

QuestionExpressionFragment

public QuestionExpressionFragment(FragmentList children)

QuestionExpressionFragment

public QuestionExpressionFragment(antlr.Token question,
                                  antlr.Token left,
                                  FragmentList children,
                                  antlr.Token right)
Method Detail

tokens

public List tokens()
Overrides:
tokens in class NestedFragment

compilePatternElement

public Expansion compilePatternElement(FragmentList tail,
                                       IdentifierFragment nowVar,
                                       IdentifierFragment nextVar)
Description copied from class: Fragment
Top level entry point to compiling fragments within a pattern
Overrides:
compilePatternElement in class NestedFragment
Following copied from class: net.sf.jse.Fragment
Parameters:
tail - remaining fragments to compiling through tail calling
nowVar - runtime variable bound to current input fragments
See Also:
Template.compilePattern(net.sf.jse.Fragment, net.sf.jse.IdentifierFragment)

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:
Template.compileTemplate(int)

compileQuestionExpression

public Fragment compileQuestionExpression(int tDepth,
                                          int qDepth)
Overrides:
compileQuestionExpression in class Fragment