#include "graphics/Menu.h"
#include "graphics/SimpleAnimation.h"
#include "graphics/Sprite.h"
+#include "loader/Interpreter.h"
+#include "loader/ParsedSource.h"
+#include "loader/Parser.h"
#include "sdl/InitImage.h"
#include "sdl/InitScreen.h"
#include "sdl/InitSDL.h"
using graphics::Menu;
using graphics::SimpleAnimation;
using graphics::Sprite;
+using loader::Interpreter;
+using loader::ParsedSource;
+using loader::Parser;
using sdl::InitImage;
using sdl::InitScreen;
using sdl::InitSDL;
// std::srand(std::time(0));
try {
+ ParsedSource source;
+ Parser parser("test-data/test.l2s", source);
+ parser.Parse();
+ cout << source;
+ Interpreter intp(source);
+ intp.ReadSource();
+
+ return 0;
+
InitSDL sdl;
InitImage image(IMG_INIT_PNG);
InitScreen screen(width, height);
app.Run();
return 0;
+ } catch (Parser::Error &e) {
+ cerr << "parsing exception in file " << e.File() << " on line " << e.Line() << ": " << e.what() << endl;
+ return 1;
} catch (exception &e) {
cerr << "exception in main(): " << e.what() << endl;
return 1;