50 #define LINE_LENGTH 1000 54 #define WORD "Latitude" 57 main(
int argc,
const char *argv[])
66 if (file.
open(argv[1]) != 0) {
98 cout <<
WORD " is on line " << places.
val(
WORD) <<
"\n";
void set_WhiteSpaceChars(const EST_String &ws)
set which characters are to be treated as whitespace
EST_TokenStream & get(EST_Token &t)
get next token in stream
A Regular expression class to go with the CSTR EST_String class.
void set_SingleCharSymbols(const EST_String &sc)
set which characters are to be treated as single character symbols
A specialised hash table for when the key is an EST_String.
void set_PrePunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation
int open(const EST_String &filename)
open a EST_TokenStream for a file.
void set_PunctuationSymbols(const EST_String &ps)
set which characters are to be treated as (post) punctuation
size_t search(const char *s, size_t len, size_t &mlen, ssize_t pos=0) const
Find a substring.
int main(int argc, const char *argv[])
V & val(const EST_String &key, int &found) const
#define EST_STRING_ERR_IDX
int add_item(const EST_String &key, const V &value, int no_search=0)
Add an entry to the table.
EST_Regex RX_Word("[A-Z]?[a-z]+\\('[a-z]+\\)?")
void dump(ostream &stream, int all=0)
Print the table to stream in a human readable format.
EST_String at(int from, int len=0) const
Return part at position.