// file:    echoSexp.java
// author:  Robert Keller
//
// purpose: Showing how single S expressions can be read, then echoed
//          using package Poly
//
// action:  Repeatedly reads single S expressions and prints them.
//
// run:     javac echoSexp.java; java echoSexp

import polya.*;

class echoSexp
  {
  public static void main(String arg[])
    {
    Tokenizer in = new Tokenizer(System.in);               // S exp tokenizer

    Object ob;                                             // Object to be read

    System.out.println("ready");

    while( (ob = in.nextSexp()) != Tokenizer.eof )         // read next S exp
      {
      System.out.println(ob);                              // echo the value
      }
    System.out.println();                                  // new line
    }
  }
