3 This file is part of libmspdatafile
4 Copyright © 2006 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
9 #include "binaryparser.h"
11 #include "statement.h"
12 #include "textparser.h"
19 Parser::Parser(istream &i, const string &s):
23 mode(new TextParser(in, src))
31 Statement Parser::parse()
34 throw Exception("Parser is not good");
40 Statement st=mode->parse();
41 if(st.keyword=="__bin")
44 mode=new BinaryParser(in, src);
46 else if(st.keyword=="__text")
49 mode=new TextParser(in, src);
55 catch(const Exception &e)
62 } // namespace DataFile