Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.memoire.silk
Class SilkInputPort  view SilkInputPort download SilkInputPort.java

java.lang.Object
  extended bycom.memoire.silk.SilkSchemeUtils
      extended bycom.memoire.silk.SilkInputPort

public class SilkInputPort
extends SilkSchemeUtils

SilkInputPort is to SilkScheme as InputStream is to Java.


Field Summary
(package private)  java.lang.StringBuffer buff
           
(package private) static java.lang.String EOF
           
(package private)  boolean exited_
           
(package private)  java.io.Reader in
           
(package private)  boolean isPushedChar
           
(package private)  boolean isPushedToken
           
(package private)  int pushedChar
           
(package private)  java.lang.Object pushedToken
           
 
Fields inherited from class com.memoire.silk.SilkSchemeUtils
FALSE, ONE, TRUE, ZERO
 
Constructor Summary
SilkInputPort(java.io.InputStream in)
          Construct an SilkInputPort from an InputStream.
SilkInputPort(java.io.Reader in)
          Construct an SilkInputPort from a Reader.
 
Method Summary
 java.lang.Object close()
          Close the port.
private  int in_read()
           
static boolean isEOF(java.lang.Object x)
          Is the argument the EOF object?
(package private)  java.lang.Object nextToken()
           
 int peekCh()
          Peek at and return the next SilkScheme character as an int, -1 for EOF.
 java.lang.Object peekChar()
          Peek at and return the next SilkScheme character (or EOF).
(package private)  int popChar()
          Pop off the previously pushed character.
(package private)  int pushChar(int ch)
          Push a character back to be re-used later.
 java.lang.Object read()
          Read and return a SilkScheme expression, or EOF.
 java.lang.Object readChar()
          Read and return a SilkScheme character or EOF.
(package private)  java.lang.Object readTail(boolean dotOK)
           
 
Methods inherited from class com.memoire.silk.SilkSchemeUtils
chr, chr, cons, equal, eqv, error, first, inPort, length, list, list, listStar, listToString, listToVector, num, num, outPort, p, p, rest, reverse, second, setFirst, setRest, str, stringify, stringify, stringify, sym, third, truth, truth, vec, vectorToList, warn, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EOF

static java.lang.String EOF

isPushedToken

boolean isPushedToken

isPushedChar

boolean isPushedChar

pushedToken

java.lang.Object pushedToken

pushedChar

int pushedChar

in

java.io.Reader in

buff

java.lang.StringBuffer buff

exited_

boolean exited_
Constructor Detail

SilkInputPort

public SilkInputPort(java.io.InputStream in)
Construct an SilkInputPort from an InputStream.


SilkInputPort

public SilkInputPort(java.io.Reader in)
Construct an SilkInputPort from a Reader.

Method Detail

in_read

private int in_read()
             throws java.io.IOException

readChar

public java.lang.Object readChar()
Read and return a SilkScheme character or EOF.


peekChar

public java.lang.Object peekChar()
Peek at and return the next SilkScheme character (or EOF). However, don't consume the character.


pushChar

int pushChar(int ch)
Push a character back to be re-used later.


popChar

int popChar()
Pop off the previously pushed character.


peekCh

public int peekCh()
Peek at and return the next SilkScheme character as an int, -1 for EOF. However, don't consume the character.


read

public java.lang.Object read()
Read and return a SilkScheme expression, or EOF.


close

public java.lang.Object close()
Close the port. Return TRUE if ok.


isEOF

public static boolean isEOF(java.lang.Object x)
Is the argument the EOF object?


readTail

java.lang.Object readTail(boolean dotOK)
                    throws java.io.IOException

nextToken

java.lang.Object nextToken()
                     throws java.io.IOException