X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fparser.h;h=6ad28b5b13c7a3824e3f05422834792cf758bccd;hb=0d8df25704366f3576c417436c90fbac2e479632;hp=c830c3c8367f5c082788ad864f23eed84266439a;hpb=505042fcda16151f5ace243c243d34af3efcf677;p=libs%2Fdatafile.git diff --git a/source/parser.h b/source/parser.h index c830c3c..6ad28b5 100644 --- a/source/parser.h +++ b/source/parser.h @@ -1,14 +1,6 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_DATAFILE_PARSER_H_ #define MSP_DATAFILE_PARSER_H_ -#include #include #include "input.h" @@ -17,7 +9,6 @@ namespace DataFile { class ParserMode; class Statement; -struct Token; /** Frontend for loading datafiles. Handles switching between text and binary @@ -27,13 +18,14 @@ statements may be read. class Parser { private: - Input in; + Input in; + std::string main_src; std::string src; - bool good; - ParserMode *mode; + bool good; + ParserMode *mode; public: - Parser(std::istream &i, const std::string &s); + Parser(IO::Base &i, const std::string &s); ~Parser(); /** @@ -42,7 +34,7 @@ public: marked as bad and no more statements may be read, even if the exception was caught. */ - Statement parse(); + Statement parse(bool raw = false); operator bool() const { return good && in; } };