- and file name. If message contains the substring `$$Token',
- it is replaced with the value of GetString()
- */
- void printError(string const & message) const;
-
- /**
- Prints the current token table on cerr.
- */
- void printTable();
-protected:
- ///
- enum {
- ///
- LEX_MAX_BUFF = 2048
- };
-
- ///
- struct pushed_table {
- ///
- pushed_table(){
- next= 0;
- table_elem= 0;
- }
- ///
- pushed_table * next;
- ///
- keyword_item * table_elem;
- ///
- int table_siz;
- };
-
- ///
- FILE * file;
- ///
- bool owns_file;
- ///
- string name;
- ///
- int lineno;
- ///
- keyword_item * table;
- ///
- int no_items;
- ///
- char buff[LEX_MAX_BUFF];
- ///
- pushed_table * pushed;
- ///
- int search_kw(char const * const) const;
- ///
- short status;
+ and file name. If message contains the substring `$$Token',
+ it is replaced with the value of GetString()
+ */
+ void printError(std::string const & message) const;
+
+ /// Prints the current token table on the supplied ostream.
+ void printTable(std::ostream &);
+
+ /// extract string
+ LyXLex & operator>>(std::string &);
+ /// extract docstring
+ LyXLex & operator>>(docstring &);
+ /// extract double
+ LyXLex & operator>>(double &);
+ /// extract integer
+ LyXLex & operator>>(int &);
+ /// extract unsigned integer
+ LyXLex & operator>>(unsigned int &);
+ /// extract bool
+ LyXLex & operator>>(bool &);
+
+ /// Quotes a string so that reading it again with LyXLex::next(true)
+ /// gets the original string
+ static std::string const quoteString(std::string const &);
+
+private:
+ class Pimpl;
+ ///
+ Pimpl * pimpl_;