Building Parsers with Java

sjm.examples.sling
Class AssignmentAssembler

java.lang.Object
  |
  +--sjm.parse.Assembler
        |
        +--sjm.examples.sling.AssignmentAssembler

public class AssignmentAssembler
extends Assembler

Pops a function and a variable, constructs an AssignFunctionCommand from these terms, and pushes the command. For example, after parsing:

     y = sin(x);
 
this assembler expects the variable y and the function sin(x) to be on the stack, and constructs a command from these objects.


Constructor Summary
AssignmentAssembler()
           
 
Method Summary
 void workOn(Assembly a)
          Pops a function and a variable, constructs an AssignFunctionCommand from these terms, and pushes the command.
 
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

AssignmentAssembler

public AssignmentAssembler()
Method Detail

workOn

public void workOn(Assembly a)
Pops a function and a variable, constructs an AssignFunctionCommand from these terms, and pushes the command.
Overrides:
workOn in class Assembler
Parameters:
Assembly - the assembly to work on

by Steve Metsker