X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fparsermode.h;h=491647e4b09a0b9c307d4f4aa32a6078403ed9a5;hb=b39ce68f12c30eedb272b65fe78baec5864d89ca;hp=ae407566a9d0442a96a699cbfde1b1387c1add91;hpb=505042fcda16151f5ace243c243d34af3efcf677;p=libs%2Fdatafile.git diff --git a/source/parsermode.h b/source/parsermode.h index ae40756..491647e 100644 --- a/source/parsermode.h +++ b/source/parsermode.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspdatafile -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_DATAFILE_PARSERMODE_H_ #define MSP_DATAFILE_PARSERMODE_H_ @@ -14,6 +7,8 @@ namespace Msp { namespace DataFile { class Input; +class Loader; +class LoaderAction; /** Base class for parse modes. @@ -22,13 +17,17 @@ class ParserMode { protected: Input ∈ - std::string src; + const std::string &src; ParserMode(Input &i, const std::string &s): in(i), src(s) { } public: virtual ~ParserMode() { } - virtual Statement parse() =0; + virtual Statement parse() = 0; + virtual void process_control_statement(const Statement &) { } + + virtual const StatementKey *peek(unsigned) { return 0; } + virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &) { return false; } }; } // namespace DataFile