4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
12 #ifndef LYXLEX_PIMPL_H
13 #define LYXLEX_PIMPL_H
17 #ifdef USE_COMPRESSION
18 # include "support/gzstream.h"
21 #include <boost/utility.hpp>
29 class LyXLex::Pimpl : boost::noncopyable {
32 Pimpl(keyword_item * tab, int num);
34 std::string const getString() const;
36 void printError(std::string const & message) const;
38 void printTable(std::ostream & os);
40 void pushTable(keyword_item * tab, int num);
44 bool setFile(std::string const & filename);
46 void setStream(std::istream & i);
48 void setCommentChar(char c);
50 bool next(bool esc = false);
52 int search_kw(char const * const tag) const;
60 void pushToken(std::string const &);
61 /// fb_ is only used to open files, the stream is accessed through is.
64 #ifdef USE_COMPRESSION
65 /// gz_ is only used to open files, the stream is accessed through is.
69 /// the stream that we use.
78 std::vector<char> buff;
95 : table_elem(0), table_siz(0) {}
97 pushed_table(keyword_item * ki, int siz)
98 : table_elem(ki), table_siz(siz) {}
100 keyword_item * table_elem;
105 std::stack<pushed_table> pushed;