oops.parser
Class GoalAdapter

java.lang.Object
  |
  +--oops.parser.GoalAdapter
Direct Known Subclasses:
GoalDebugger

public class GoalAdapter
extends java.lang.Object
implements Goal

trivial implementation, reduces to first node.


Field Summary
protected  java.lang.Object result
           
 
Constructor Summary
GoalAdapter()
           
 
Method Summary
 java.lang.Object reduce()
          concludes rule recognition.
 void shift(Goal sender, java.lang.Object node)
          presents result of reduction.
 void shift(Lit sender, java.lang.Object node)
          presents result of scanning.
 void shift(Token sender, java.lang.Object node)
          presents result of scanning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

result

protected java.lang.Object result
Constructor Detail

GoalAdapter

public GoalAdapter()
Method Detail

shift

public void shift(Goal sender,
                  java.lang.Object node)
Description copied from interface: Goal
presents result of reduction.
Specified by:
shift in interface Goal
Tags copied from interface: Goal
Parameters:
sender - just received reduce().
value - was created by sender.

shift

public void shift(Token sender,
                  java.lang.Object node)
Description copied from interface: Goal
presents result of scanning.
Specified by:
shift in interface Goal
Tags copied from interface: Goal
Parameters:
sender - just matched input.
value - was created by sender.

shift

public void shift(Lit sender,
                  java.lang.Object node)
Description copied from interface: Goal
presents result of scanning.
Specified by:
shift in interface Goal
Tags copied from interface: Goal
Parameters:
sender - just matched input.
value - was created by sender.

reduce

public java.lang.Object reduce()
Description copied from interface: Goal
concludes rule recognition.
Specified by:
reduce in interface Goal
Tags copied from interface: Goal
Returns:
generated (sub-)tree.