Building Parsers with Java

sjm.examples.logic
Class AtomAssembler

java.lang.Object
  |
  +--sjm.parse.Assembler
        |
        +--sjm.examples.logic.AtomAssembler

public class AtomAssembler
extends Assembler

Exchanges a token on an assembly's stack with an atom that has the token's value as its functor.


Constructor Summary
AtomAssembler()
           
 
Method Summary
 void workOn(Assembly a)
          Exchanges a token on an assembly's stack with an atom that has the token's value as its functor.
 
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

AtomAssembler

public AtomAssembler()
Method Detail

workOn

public void workOn(Assembly a)
Exchanges a token on an assembly's stack with an atom that has the token's value as its functor. In the case of a quoted string, this assembler removes the quotes, so that a string such as "Smith" becomes just Smith. In the case of a number, this assembler pushes a NumberFact.
Overrides:
workOn in class Assembler
Parameters:
Assembly - the assembly to work on

by Steve Metsker