X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbinaryparser.h;h=dfb0de995c7092dd60c9ebc19d6d636b408de84b;hb=b39ce68f12c30eedb272b65fe78baec5864d89ca;hp=4f33d954602d3c5454f1cd8d8729a2d674cc6a3e;hpb=6f94aaece716a31e75166e261cc47579288892b4;p=libs%2Fdatafile.git diff --git a/source/binaryparser.h b/source/binaryparser.h index 4f33d95..dfb0de9 100644 --- a/source/binaryparser.h +++ b/source/binaryparser.h @@ -2,7 +2,6 @@ #define MSP_DATAFILE_BINARYPARSER_H_ #include -#include "binarydict.h" #include "parsermode.h" #include "type.h" @@ -15,24 +14,30 @@ Parses data in binary format. class BinaryParser: public ParserMode { private: - typedef std::map Dictionary; + typedef std::map Dictionary; typedef std::map StringMap; Dictionary dict; StringMap strings; - bool first; + unsigned float_precision; + StatementInfo *cur_info; + std::vector sub_remaining; public: BinaryParser(Input &i, const std::string &s); virtual Statement parse(); + virtual void process_control_statement(const Statement &); + + virtual const StatementKey *peek(unsigned); + virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &); + private: - Statement parse_statement(); - long long parse_int(); - float parse_float(); - std::string parse_string(); - bool parse_bool(); - Symbol parse_symbol(); + IntType::Store parse_int(); + FloatType::Store parse_float(); + StringType::Store parse_string(); + BoolType::Store parse_bool(); + SymbolType::Store parse_symbol(); }; } // namespace DataFile