00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00022 #ifndef INC_SOFU_PARSER_H
00023 #define INC_SOFU_PARSER_H
00024
00025 #include "main.h"
00026
00027 namespace Sofu
00028 {
00029 class Object;
00030 class Composite;
00031
00038 Composite* parseFile(const string& filename);
00039
00046 Composite* parseStream(istream& file);
00047
00054 struct Exc_UnexpectedEndOfFile : public Exc
00055 {
00056 Exc_UnexpectedEndOfFile(void)
00057 : Exc("Sofu encountered an unexpected End of File while parsing.")
00058 { }
00059 };
00060
00065 struct Exc_ReadError : public Exc
00066 {
00067 Exc_ReadError(void)
00068 : Exc("Sofu encountered a read error while parsing.")
00069 { }
00070 };
00071
00074 struct Exc_UnsuccessfulRead : public Exc
00075 {
00076 Exc_UnsuccessfulRead(void)
00077 : Exc("Sofu couldn't parse the file successfully.")
00078 { }
00079 };
00080 }
00081
00082 #endif // INC_PARSER_H