1 #ifndef MSP_DATAFILE_PARSERMODE_H_
2 #define MSP_DATAFILE_PARSERMODE_H_
14 Base class for parse modes.
20 const std::string &src;
22 ParserMode(Input &i, const std::string &s): in(i), src(s) { }
24 virtual ~ParserMode() { }
26 virtual Statement parse() = 0;
27 virtual void process_control_statement(const Statement &) { }
29 virtual const StatementKey *peek(unsigned) { return 0; }
30 virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &) { return false; }
33 } // namespace DataFile