-package "mspparser"
+/* $Id$ */
+
+package "mspdatafile"
{
version "0.2";
- description "Mikkosoft Productions datafile parser";
+ description "Mikkosoft Productions datafile library";
require "mspcore";
- library "mspparser"
+ library "mspdatafile"
{
source "source";
install true;
- install_headers "msp/parser";
+ install_headers "msp/datafile";
};
};
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_CONSTANT_H_
-#define MSP_PARSER_CONSTANT_H_
+#ifndef MSP_DATAFILE_CONSTANT_H_
+#define MSP_DATAFILE_CONSTANT_H_
class Constant
{
-#ifndef MSP_PARSER_ERROR_H_
-#define MSP_PARSER_ERROR_H_
+/* $Id$
+
+This file is part of libmspdatafile
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+#ifndef MSP_DATAFILE_ERROR_H_
+#define MSP_DATAFILE_ERROR_H_
#include <msp/core/error.h>
namespace Msp {
-namespace Parser {
+namespace DataFile {
class TypeError: public Exception
{
unsigned line;
};
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
#include "input.h"
namespace Msp {
-namespace Parser {
+namespace DataFile {
Input::Input(std::istream &i):
in(i),
return next;
}
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_INPUT_H_
-#define MSP_PARSER_INPUT_H_
+#ifndef MSP_DATAFILE_INPUT_H_
+#define MSP_DATAFILE_INPUT_H_
#include <istream>
namespace Msp {
-namespace Parser {
+namespace DataFile {
class Input
{
int next;
};
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_LOADER_H_
-#define MSP_PARSER_LOADER_H_
+#ifndef MSP_DATAFILE_LOADER_H_
+#define MSP_DATAFILE_LOADER_H_
#include <fstream>
#include <map>
#include "value.h"
namespace Msp {
-namespace Parser {
+namespace DataFile {
class Loader;
class Statement;
loader.load(parser);
}
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
using namespace std;
namespace Msp {
-namespace Parser {
+namespace DataFile {
Parser::Parser(istream &i, const string &s):
in(i),
throw ParseError(ss.str(), src, in.get_line_number());
}
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_PARSER_H_
-#define MSP_PARSER_PARSER_H_
+#ifndef MSP_DATAFILE_PARSER_H_
+#define MSP_DATAFILE_PARSER_H_
#include <istream>
#include <string>
#include "input.h"
namespace Msp {
-namespace Parser {
+namespace DataFile {
class Statement;
struct Token;
void parse_error(int, int);
};
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_STATEMENT_H_
-#define MSP_PARSER_STATEMENT_H_
+#ifndef MSP_DATAFILE_STATEMENT_H_
+#define MSP_DATAFILE_STATEMENT_H_
#include <list>
#include <sstream>
#include "value.h"
namespace Msp {
-namespace Parser {
+namespace DataFile {
class Statement
{
{ std::ostringstream ss; ss<<source<<':'<<line; return ss.str(); }
};
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_TOKEN_H_
-#define MSP_PARSER_TOKEN_H_
+#ifndef MSP_DATAFILE_TOKEN_H_
+#define MSP_DATAFILE_TOKEN_H_
namespace Msp {
-namespace Parser {
+namespace DataFile {
struct Token
{
Token(Type t, const std::string &s): type(t), str(s) { }
};
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif
-/*
-This file is part of libmspparser
+/* $Id$
+
+This file is part of libmspdatafile
Copyright © 2006 Mikko Rasa, Mikkosoft Productions
Distributed under the LGPL
*/
-#ifndef MSP_PARSER_VALUE_H_
-#define MSP_PARSER_VALUE_H_
+#ifndef MSP_DATAFILE_VALUE_H_
+#define MSP_DATAFILE_VALUE_H_
#include <sstream>
#include <string>
#include "error.h"
namespace Msp {
-namespace Parser {
+namespace DataFile {
class Value
{
return data;
}
-} // namespace Parser
+} // namespace DataFile
} // namespace Msp
#endif