summaryrefslogtreecommitdiff
path: root/project2/sql/sqlFlexLexer.h
blob: 55019e58b6cde8be0618e4b2af9b9c07cafccc11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <istream>
#include <string>
#include <connection.h>
#include <boost/filesystem/path.hpp>

class sqlFlexLexer : public yyFlexLexer {
	public:
		sqlFlexLexer(const boost::filesystem::path &, std::istream &, DB::Connection *);
		int yylex();

		void Comment(const std::string &);
		void Statement(const std::string &);
		std::string MockScriptDir() const;

	protected:
		void LexerError(const char *) override;

	private:
		DB::Connection * conn;
		const boost::filesystem::path script;
		std::string comment;
		std::string statement;
};