3 This file is part of libmspdatafile
4 Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_DATAFILE_PARSER_H_
9 #define MSP_DATAFILE_PARSER_H_
23 Frontend for loading datafiles. Handles switching between text and binary
24 formats. A Parser evaluates into a boolean value indicating whether more
25 statements may be read.
36 Parser(std::istream &i, const std::string &s);
40 Reads a statement from the input. If the end of input was reached, an empty
41 invalid statement will be returned. If an error occurs, the parser will be
42 marked as bad and no more statements may be read, even if the exception was
47 operator bool() const { return good && in; }
50 } // namespace DataFile