00001 #ifndef TAGCOLL_TAGEXPR_PARSER_H
00002 #define TAGCOLL_TAGEXPR_PARSER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <tagcoll/tagexpr/Tagexpr.h>
00025 #include <string>
00026
00027 namespace Tagcoll
00028 {
00029
00030 class TagexprParser
00031 {
00032 protected:
00033 static TagexprParser* _instance;
00034
00035 Tagexpr* result;
00036 std::string errorMessage;
00037
00038 public:
00039
00040 void setResult(Tagexpr* result) throw () { this->result = result; }
00041 void addError(const std::string& message) throw () { errorMessage += message; }
00042
00043
00044 Tagexpr* parse(const std::string& buffer) throw ();
00045
00046
00047 const std::string& getErrorMessage() const throw () { return errorMessage; }
00048 std::string getErrorMessage() throw () { return errorMessage; }
00049
00050 static TagexprParser* instance() throw ();
00051 };
00052
00053 };
00054
00055
00056 #endif