Building Parsers with Java

sjm.imperative
Class AssignmentCommand

java.lang.Object
  |
  +--sjm.imperative.Command
        |
        +--sjm.imperative.AssignmentCommand

public class AssignmentCommand
extends Command

This class holds an sjm.engine.Evaluation object, and executes it upon receiving an execute command.


Field Summary
protected  Evaluation evaluation
           
 
Constructor Summary
AssignmentCommand(Evaluation evaluation)
          Construct an Assignment command from the given Evaluation.
 
Method Summary
 void execute()
          Execute the assignment.
 java.lang.String toString()
          Returns a string representation of this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

evaluation

protected Evaluation evaluation
Constructor Detail

AssignmentCommand

public AssignmentCommand(Evaluation evaluation)
Construct an Assignment command from the given Evaluation.
Method Detail

execute

public void execute()
Execute the assignment. Evaluate the evaluation's second term, and retrieve the variable from the evaluation's first term. Unbind the variable, so that it can unify, and unify the variable with the second term.
Overrides:
execute in class Command

toString

public java.lang.String toString()
Returns a string representation of this command.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this command

by Steve Metsker