00001
00002
00003 #ifndef __MGFP_INCLUDE_DRIVER_H__
00004 #define __MGFP_INCLUDE_DRIVER_H__
00005
00006 #include <string>
00007 #include <vector>
00008
00009 #include <mgfp/Context.h>
00010 #include <mgfp/MgfSpectrum.h>
00011
00012 namespace mgf
00013 {
00014
00015 class MGFP_EXPORT Scanner;
00016
00023 class MGFP_EXPORT Driver
00024 {
00025 public:
00027 Driver(MgfFile& mgfFile);
00028
00030 bool trace_scanning;
00031
00033 bool trace_parsing;
00034
00036 std::string streamname;
00037
00043 bool parse_stream(std::istream& in,
00044 const std::string& sname = "stream input");
00045
00051 bool parse_string(const std::string& input,
00052 const std::string& sname = "string stream");
00053
00059 bool parse_file(const std::string& filename);
00060
00061
00062
00063
00064
00067 void error(const class location& l, const std::string& m);
00068
00071 void error(const std::string& m);
00072
00075 Scanner* lexer;
00076
00079 Context context;
00080 };
00081
00082 }
00083
00084 #endif // __MGFP_INCLUDE_DRIVER_H__