net.sf.jse
Class NestedFragment

java.lang.Object
  |
  +--net.sf.jse.Fragment
        |
        +--net.sf.jse.CompoundFragment
              |
              +--net.sf.jse.NestedFragment
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
BracesFragment, BracketsFragment, ParensFragment, QuestionExpressionFragment, Template

public class NestedFragment
extends CompoundFragment

A compound fragment with brackets

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

Fields inherited from class net.sf.jse.Fragment
out
 
Constructor Summary
NestedFragment(FragmentList children)
           
 
Method Summary
 Expansion compileNestedPatternElements(List parts, IdentifierFragment nowVar)
           
 Expansion compilePatternElement(FragmentList tail, IdentifierFragment nowVar, IdentifierFragment endVar)
          Top level entry point to compiling fragments within a pattern
 Fragment compileTemplate(int depth)
          Template code generator -- probably should be compileTemplateElement
 Fragment expandMacros(MacroExpander expander, boolean isRecursive)
           
 Fragment expandTemplates()
           
 FragmentList getInsideFragments()
           
 FragmentList getNestedFragments()
           
 Fragment markMacros(MacroExpander expander)
           
 void setInsideFragments(FragmentList fs)
           
 List tokens()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jse.CompoundFragment
collectBoundVariables, compileNestedTemplate
 
Methods inherited from class net.sf.jse.Fragment
capitalize, compileQuestionExpression, 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

NestedFragment

public NestedFragment(FragmentList children)
Method Detail

getNestedFragments

public FragmentList getNestedFragments()

getInsideFragments

public FragmentList getInsideFragments()
Overrides:
getInsideFragments in class Fragment

setInsideFragments

public void setInsideFragments(FragmentList fs)
Overrides:
setInsideFragments in class CompoundFragment

tokens

public List tokens()
Overrides:
tokens in class CompoundFragment

expandTemplates

public Fragment expandTemplates()
Overrides:
expandTemplates in class Fragment

compileTemplate

public Fragment compileTemplate(int depth)
Description copied from class: Fragment
Template code generator -- probably should be compileTemplateElement
Overrides:
compileTemplate in class CompoundFragment
Following copied from class: net.sf.jse.Fragment
See Also:
Template.compileTemplate(int)

markMacros

public Fragment markMacros(MacroExpander expander)
Overrides:
markMacros in class Fragment

expandMacros

public Fragment expandMacros(MacroExpander expander,
                             boolean isRecursive)
Overrides:
expandMacros in class Fragment

compilePatternElement

public Expansion compilePatternElement(FragmentList tail,
                                       IdentifierFragment nowVar,
                                       IdentifierFragment endVar)
Description copied from class: Fragment
Top level entry point to compiling fragments within a pattern
Overrides:
compilePatternElement in class Fragment
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)

compileNestedPatternElements

public Expansion compileNestedPatternElements(List parts,
                                              IdentifierFragment nowVar)

toString

public java.lang.String toString()
Overrides:
toString in class CompoundFragment