 
 
	 
In file ../include/EST_Token.h:
| class EST_TokenStream | 
A class that allows the reading of EST_Tokens from a file stream, pipe or string.
| ![[more]](icon1.gif)  | EST_TokenStream () | ||||||||||||||||||||||||
| ![[more]](icon1.gif)  | ~EST_TokenStream () will close file if appropriate for type | ||||||||||||||||||||||||
| ![[more]](icon1.gif)  | stream access functions 
 | ||||||||||||||||||||||||
| ![[more]](icon1.gif)  | stream initialization functions 
 | ||||||||||||||||||||||||
| ![[more]](icon1.gif)  | miscellaneous 
 | 
| ![[more]](icon1.gif)  |  | 
A class that allows the reading of EST_Tokens from a file stream, pipe or string. It automatically tokenizes a file based on user definable whitespace and punctuation.The definitions of whitespace and punctuation are user definable. Also support for single character symbols is included. Single character symbols always are treated as individual tokens irrespective of their white space context. Also a quote mode can be used to read uqoted tokens.
The setting of whitespace, pre and post punctuation, single character symbols and quote mode must be down (immediately) after opening the stream.
There is no unget but peek provides look ahead of one token.
Note there is an interesting issue about what to do about the last whitespace in the file. Should it be ignored or should it be attached to a token with a name string of length zero. In unquoted mode the eof() will return TRUE if the next token name is empty (the mythical last token). In quoted mode the last must be returned so eof will not be raised.
 EST_TokenStream()
 EST_TokenStream()
 ~EST_TokenStream()
 ~EST_TokenStream()
 
 
 int open(const EST_String &filename)
int open(const EST_String &filename)
 int open(FILE* ofp, int close_when_finished)
int open(FILE* ofp, int close_when_finished)
 int open(istream &newis)
int open(istream &newis)
 int open_string(const EST_String &newbuffer)
int open_string(const EST_String &newbuffer)
 void close(void)
void close(void)
 stream access functions
 stream access functions 
 EST_TokenStream& get(EST_Token &t)
EST_TokenStream& get(EST_Token &t)
 EST_Token& get()
EST_Token& get()
 get the next token which must be the argument.
 get the next token which must be the argument. 
 EST_Token get_upto(const EST_String &s)
EST_Token get_upto(const EST_String &s)
 EST_Token get_upto_eoln(void)
EST_Token get_upto_eoln(void)
 EST_Token& peek(void)
EST_Token& peek(void)
 int fread(void* buff, int size, int nitems)
int fread(void* buff, int size, int nitems)
 stream initialization functions
 stream initialization functions 
 void set_WhiteSpaceChars(const EST_String &ws)
void set_WhiteSpaceChars(const EST_String &ws)
 void set_SingleCharSymbols(const EST_String &sc)
void set_SingleCharSymbols(const EST_String &sc)
 void set_PunctuationSymbols(const EST_String &ps)
void set_PunctuationSymbols(const EST_String &ps)
 void set_PrePunctuationSymbols(const EST_String &ps)
void set_PrePunctuationSymbols(const EST_String &ps)
 void set_quotes(char q, char e)
void set_quotes(char q, char e)
 int quoted_mode(void)
int quoted_mode(void)
 miscellaneous
 miscellaneous 
 int linenum(void) const
int linenum(void) const 
 int eof()
int eof()
 int eoln()
int eoln()
 int filepos(void) const
int filepos(void) const 
 int tell(void) const
int tell(void) const 
 int seek(int position)
int seek(int position)
 int restart(void)
int restart(void)
 const EST_String pos_description()
const EST_String pos_description()
 const EST_String filename() const
const EST_String filename() const 
 FILE* filedescriptor()
FILE* filedescriptor()
 EST_TokenStream& operator >>(EST_Token &p)
EST_TokenStream& operator >>(EST_Token &p)
 EST_TokenStream& operator >>(EST_String &p)
EST_TokenStream& operator >>(EST_String &p)
Alphabetic index HTML hierarchy of classes or Java
 
This page is part of the 
Edinburgh Speech Tools Library documentation
Copyright  University of Edinburgh 1997
Contact:  
         speech_tools@cstr.ed.ac.uk