X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fparsermode.h;h=9d47ae422f8753bfb7a7a16f401e40b615a43729;hb=daca21051927eabee098e422fe5a0990acacfb96;hp=339bdb78e4bc66536dab675a0517fc748a9a5824;hpb=215e719d0ef85f748898660d15d01e77ac551de9;p=libs%2Fdatafile.git diff --git a/source/parsermode.h b/source/parsermode.h index 339bdb7..9d47ae4 100644 --- a/source/parsermode.h +++ b/source/parsermode.h @@ -1,24 +1,20 @@ -/* $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_ +#include #include "statement.h" namespace Msp { namespace DataFile { class Input; +class Loader; +class LoaderAction; /** Base class for parse modes. */ -class ParserMode +class ParserMode: private NonCopyable { protected: Input ∈ @@ -29,6 +25,10 @@ public: virtual ~ParserMode() { } virtual Statement parse() = 0; + virtual void process_control_statement(const Statement &) { } + + virtual const StatementKey *peek(unsigned) { return nullptr; } + virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &) { return false; } }; } // namespace DataFile