Building Parsers with Java

sjm.examples.arithmetic
Class TimesAssembler

java.lang.Object
  |
  +--sjm.parse.Assembler
        |
        +--sjm.examples.arithmetic.TimesAssembler

public class TimesAssembler
extends Assembler

Pop two numbers from the stack and push the result of multiplying the top number by the one below it.


Constructor Summary
TimesAssembler()
           
 
Method Summary
 void workOn(Assembly a)
          Pop two numbers from the stack and push the result of multiplying the top number by the one below it.
 
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
 

Constructor Detail

TimesAssembler

public TimesAssembler()
Method Detail

workOn

public void workOn(Assembly a)
Pop two numbers from the stack and push the result of multiplying the top number by the one below it.
Overrides:
workOn in class Assembler
Parameters:
Assembly - the assembly whose stack to use

by Steve Metsker