X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLexer.h;h=d4e440121c87f726c9e939ba124cd24b1c010c0e;hb=3f7d2a66f522a45583e0a8b0ba734bb71f0ddde0;hp=a8da886c8ffb470e02f1cbe1273840ff85f6da39;hpb=39e79d8602920eefe36e898c9f415afb979521b2;p=lyx.git diff --git a/src/Lexer.h b/src/Lexer.h index a8da886c8f..d4e440121c 100644 --- a/src/Lexer.h +++ b/src/Lexer.h @@ -17,11 +17,7 @@ #ifndef LEXER_H #define LEXER_H -#include "support/docstring.h" - -#include - -#include +#include "support/strfwd.h" namespace lyx { @@ -37,10 +33,10 @@ struct keyword_item { }; /** 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) { @@ -51,11 +47,11 @@ struct keyword_item { 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); @@ -76,11 +72,11 @@ public: /// 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; @@ -175,6 +171,11 @@ public: static std::string const quoteString(std::string const &); private: + /// noncopiable + Lexer(Lexer const &); + void operator=(Lexer const &); + + /// class Pimpl; /// Pimpl * pimpl_;