    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Interface w3c.tools.sexpr.SExprStream

public interface SExprStream
extends SExprParser

An interface for a full s-expression parser.

##

addParser(char, SExprParser)
  Associate an input character with a "sub-parser."
getListsAsVectors()
  Checks whether lists are to be parsed as Vectors or Cons cells.
getReadtable()
  Access the dispatch table of the parser.
getScratchBuffer()
  Accesses an empty string buffer available temporary storage.
getSymbols()
  Access the symbol table of the parser.
parse()
  Parse a single object from the stream.
read()
  Read a single character from the stream.
readSkipWhite()
  Reads from the stream, skipping whitespace.
setListsAsVectors(boolean)
  Controls whether parsed lists are Vectors or Cons cells.
setReadtable(Readtable)
  Assign the dispatch table of the parser.
setSymbols(Dictionary)
  Assign the symbol table of the parser.

##

parse

     public abstract Object parse() throws SExprParserException, IOException

  Parse a single object from the stream.

  Throws: SExpParseException
    if the input stream cannot be parsed.
  Throws: IOException
    if the input stream cannot be opened or read.

getSymbols

     public abstract Dictionary getSymbols()

  Access the symbol table of the parser.

setSymbols

     public abstract Dictionary setSymbols(Dictionary symbols)

  Assign the symbol table of the parser.

getReadtable

     public abstract Readtable getReadtable()

  Access the dispatch table of the parser.

setReadtable

     public abstract Readtable setReadtable(Readtable readtable)

  Assign the dispatch table of the parser.

addParser

     public abstract SExprParser addParser(char key,
                                           SExprParser parser)

  Associate an input character with a "sub-parser."

getListsAsVectors

     public abstract boolean getListsAsVectors()

  Checks whether lists are to be parsed as Vectors or Cons cells.

setListsAsVectors

     public abstract boolean setListsAsVectors(boolean listsAsVectors)

  Controls whether parsed lists are Vectors or Cons cells.

getScratchBuffer

     public abstract StringBuffer getScratchBuffer()

  Accesses an empty string buffer available temporary storage.

readSkipWhite

     public abstract char readSkipWhite() throws IOException

  Reads from the stream, skipping whitespace.

read

     public abstract int read()

  Read a single character from the stream. This method is here because there is no InputStream interface in the java.io package (JavaSoft please take notice!).

    All Packages  Class Hierarchy  This Package  Previous  Next  Index