Building Parsers with Java

sjm.examples.pretty
Class PrettyRepetitionAssembler

java.lang.Object
  |
  +--sjm.parse.Assembler
        |
        +--sjm.examples.pretty.PrettyRepetitionAssembler

public class PrettyRepetitionAssembler
extends Assembler

Replace the nodes above a given "fence" object with a new composite that holds the popped nodes as its children.


Field Summary
protected  java.lang.Object fence
           
protected  java.lang.String name
           
 
Constructor Summary
PrettyRepetitionAssembler(java.lang.String name, java.lang.Object fence)
          Construct an assembler that will replace the nodes above the supplied "fence" object with a new composite that will hold the popped nodes as its children.
 
Method Summary
 void workOn(Assembly a)
          Replace the nodes above a given "fence" object with a new composite that holds the popped nodes as its children.
 
Methods inherited from class sjm.parse.Assembler
elementsAbove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

fence

protected java.lang.Object fence
Constructor Detail

PrettyRepetitionAssembler

public PrettyRepetitionAssembler(java.lang.String name,
                                 java.lang.Object fence)
Construct an assembler that will replace the nodes above the supplied "fence" object with a new composite that will hold the popped nodes as its children.
Method Detail

workOn

public void workOn(Assembly a)
Replace the nodes above a given "fence" object with a new composite that holds the popped nodes as its children.
Overrides:
workOn in class Assembler
Parameters:
Assembly - the assembly to work on

by Steve Metsker