Building Parsers with Java

sjm.examples.pretty
Class PrettyAlternationAssembler

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

public class PrettyAlternationAssembler
extends Assembler

Replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child.


Field Summary
protected  java.lang.String name
           
 
Constructor Summary
PrettyAlternationAssembler(java.lang.String name)
          Create an assembler that will replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child and whose name is as supplied here.
 
Method Summary
 void workOn(Assembly a)
          Replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child.
 
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
Constructor Detail

PrettyAlternationAssembler

public PrettyAlternationAssembler(java.lang.String name)
Create an assembler that will replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child and whose name is as supplied here.
Method Detail

workOn

public void workOn(Assembly a)
Replace a ComponentNode object on the stack with a new composite that holds the popped node as its only child.
Overrides:
workOn in class Assembler
Parameters:
Assembly - the assembly to work on

by Steve Metsker