]> git.tdb.fi Git - libs/datafile.git/blob - source/parsermode.h
Emit source file markers in compiled files
[libs/datafile.git] / source / parsermode.h
1 /* $Id$
2
3 This file is part of libmspdatafile
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_DATAFILE_PARSERMODE_H_
9 #define MSP_DATAFILE_PARSERMODE_H_
10
11 #include "statement.h"
12
13 namespace Msp {
14 namespace DataFile {
15
16 class Input;
17
18 /**
19 Base class for parse modes.
20 */
21 class ParserMode
22 {
23 protected:
24         Input ∈
25         const std::string &src;
26
27         ParserMode(Input &i, const std::string &s): in(i), src(s) { }
28 public:
29         virtual ~ParserMode() { }
30
31         virtual Statement parse() =0;
32 };
33
34 } // namespace DataFile
35 } // namespace Msp
36
37 #endif