Building Parsers with Java

sjm.examples.pretty
Class PrettySequenceAssembler

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

public class PrettySequenceAssembler
extends Assembler

Replace a given number of nodes on the stack with a new composite that holds the popped nodes as its children.


Field Summary
protected  java.lang.String name
           
protected  int numberNodes
           
 
Constructor Summary
PrettySequenceAssembler(java.lang.String name, int numberNodes)
          Construct an assembler that will replace a given number of nodes on the stack with a new composite that holds the popped nodes as its children.
 
Method Summary
 void workOn(Assembly a)
          Replace a given number of nodes on the stack 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

numberNodes

protected int numberNodes
Constructor Detail

PrettySequenceAssembler

public PrettySequenceAssembler(java.lang.String name,
                               int numberNodes)
Construct an assembler that will replace a given number of nodes on the stack with a new composite that holds the popped nodes as its children.
Method Detail

workOn

public void workOn(Assembly a)
Replace a given number of nodes on the stack 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