00001 #ifndef STRINGPARSERINPUT_H
00002 #define STRINGPARSERINPUT_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #pragma interface
00025
00026 #include <tagcoll/ParserBase.h>
00027 #include <string>
00028
00029 class StringParserInput : public ParserInput
00030 {
00031 protected:
00032 static const std::string fname;
00033 const std::string& _str;
00034 std::string::const_iterator _s;
00035 int _line;
00036
00037 public:
00038 StringParserInput(const std::string& str) throw ();
00039 virtual ~StringParserInput() throw () {}
00040
00041 virtual const std::string& fileName() const throw () { return fname; }
00042 virtual int lineNumber() const throw () { return _line; }
00043
00044 virtual int nextChar() throw ();
00045 virtual void pushChar(int c) throw ();
00046 };
00047
00048
00049 #endif