1 #ifndef MSP_DATAFILE_BINARYPARSER_H_
2 #define MSP_DATAFILE_BINARYPARSER_H_
5 #include "parsermode.h"
12 Parses data in binary format.
14 class BinaryParser: public ParserMode
17 typedef std::map<int, StatementInfo> Dictionary;
18 typedef std::map<unsigned, std::string> StringMap;
22 unsigned float_precision = 32;
23 StatementInfo *cur_info = nullptr;
24 std::vector<unsigned> sub_remaining;
27 BinaryParser(Input &i, const std::string &s);
29 Statement parse() override;
30 void process_control_statement(const Statement &) override;
32 const StatementKey *peek(unsigned) override;
33 bool parse_and_load(unsigned, Loader &, const LoaderAction &) override;
36 IntType::Store parse_int();
37 FloatType::Store parse_float();
38 StringType::Store parse_string();
39 BoolType::Store parse_bool();
40 SymbolType::Store parse_symbol();
43 } // namespace DataFile