#ifndef LEXER_H
#define LEXER_H
-#include "support/docstring.h"
-
-#include <boost/utility.hpp>
-
-#include <iosfwd>
+#include "support/strfwd.h"
namespace lyx {
};
/** Generalized simple lexical analizer.
- Use the method isOK() to check if there is still data available
+ Use the method isOK() to check if there is still data available
for lexing. Use one of the the operators void* or ! to test if
the last reading operation was successful.
-
+
Example:
int readParam(LyxLex &lex) {
if (lex) param = p; // only use the input if reading was successful
}
return param;
- }
+ }
@see LyXRC.cpp for an example of usage.
*/
-class Lexer : boost::noncopyable {
+class Lexer {
public:
///
Lexer(keyword_item *, int);
/// stream is open and end of stream is not reached
/// FIXME: test also if pushTok is not empty
- /// FIXME: the method should be renamed to something like
+ /// FIXME: the method should be renamed to something like
/// dataAvailable(), in order to reflect the real behavior
bool isOK() const;
/// FIXME: The next two operators should be replaced by one method
- /// called e.g. lastReadOk(), in order to reflect the real
+ /// called e.g. lastReadOk(), in order to reflect the real
/// behavior
/// last read operation was successful.
operator void const *() const;
static std::string const quoteString(std::string const &);
private:
+ /// noncopiable
+ Lexer(Lexer const &);
+ void operator=(Lexer const &);
+
+ ///
class Pimpl;
///
Pimpl * pimpl_;