mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
rename LyXLex into Lexer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18033 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c22d1bb430
commit
39e79d8602
@ -32,7 +32,7 @@
|
||||
#include "LaTeX.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXAction.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXVC.h"
|
||||
@ -406,7 +406,7 @@ void unknownClass(string const & unknown)
|
||||
} // anon
|
||||
|
||||
|
||||
int Buffer::readHeader(LyXLex & lex)
|
||||
int Buffer::readHeader(Lexer & lex)
|
||||
{
|
||||
int unknown_tokens = 0;
|
||||
int line = -1;
|
||||
@ -480,7 +480,7 @@ int Buffer::readHeader(LyXLex & lex)
|
||||
// Uwe C. Schroeder
|
||||
// changed to be public and have one parameter
|
||||
// Returns false if "\end_document" is not read (Asger)
|
||||
bool Buffer::readDocument(LyXLex & lex)
|
||||
bool Buffer::readDocument(Lexer & lex)
|
||||
{
|
||||
ErrorList & errorList = errorLists_["Parse"];
|
||||
errorList.clear();
|
||||
@ -574,7 +574,7 @@ bool Buffer::readString(std::string const & s)
|
||||
|
||||
// remove dummy empty par
|
||||
paragraphs().clear();
|
||||
LyXLex lex(0, 0);
|
||||
Lexer lex(0, 0);
|
||||
std::istringstream is(s);
|
||||
lex.setStream(is);
|
||||
FileName const name(tempName());
|
||||
@ -606,7 +606,7 @@ bool Buffer::readFile(FileName const & filename)
|
||||
|
||||
// remove dummy empty par
|
||||
paragraphs().clear();
|
||||
LyXLex lex(0, 0);
|
||||
Lexer lex(0, 0);
|
||||
lex.setFile(filename);
|
||||
if (readFile(lex, filename) != success)
|
||||
return false;
|
||||
@ -627,7 +627,7 @@ void Buffer::fully_loaded(bool const value)
|
||||
}
|
||||
|
||||
|
||||
Buffer::ReadStatus Buffer::readFile(LyXLex & lex, FileName const & filename,
|
||||
Buffer::ReadStatus Buffer::readFile(Lexer & lex, FileName const & filename,
|
||||
bool fromstring)
|
||||
{
|
||||
BOOST_ASSERT(!filename.empty());
|
||||
|
@ -41,7 +41,7 @@ class FuncRequest;
|
||||
class InsetBase;
|
||||
class InsetText;
|
||||
class LyXFont;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class LyXRC;
|
||||
class LyXText;
|
||||
class LyXVC;
|
||||
@ -111,13 +111,13 @@ public:
|
||||
bool readFile(support::FileName const & filename);
|
||||
|
||||
/// read the header, returns number of unknown tokens
|
||||
int readHeader(LyXLex & lex);
|
||||
int readHeader(Lexer & lex);
|
||||
|
||||
/** Reads a file without header.
|
||||
\param par if != 0 insert the file.
|
||||
\return \c false if file is not completely read.
|
||||
*/
|
||||
bool readDocument(LyXLex &);
|
||||
bool readDocument(Lexer &);
|
||||
|
||||
///
|
||||
void insertStringAsLines(ParagraphList & plist,
|
||||
@ -394,7 +394,7 @@ private:
|
||||
/** Inserts a file into a document
|
||||
\return \c false if method fails.
|
||||
*/
|
||||
ReadStatus readFile(LyXLex &, support::FileName const & filename,
|
||||
ReadStatus readFile(Lexer &, support::FileName const & filename,
|
||||
bool fromString = false);
|
||||
|
||||
/// Use the Pimpl idiom to hide the internals.
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXFont.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXTextClassList.h"
|
||||
#include "OutputParams.h"
|
||||
@ -411,7 +411,7 @@ void BufferParams::setDefSkip(VSpace const & vs)
|
||||
}
|
||||
|
||||
|
||||
string const BufferParams::readToken(LyXLex & lex, string const & token)
|
||||
string const BufferParams::readToken(Lexer & lex, string const & token)
|
||||
{
|
||||
if (token == "\\textclass") {
|
||||
lex.next();
|
||||
@ -1187,7 +1187,7 @@ LyXFont const BufferParams::getFont() const
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::readPreamble(LyXLex & lex)
|
||||
void BufferParams::readPreamble(Lexer & lex)
|
||||
{
|
||||
if (lex.getString() != "\\begin_preamble")
|
||||
lyxerr << "Error (BufferParams::readPreamble):"
|
||||
@ -1197,7 +1197,7 @@ void BufferParams::readPreamble(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::readLanguage(LyXLex & lex)
|
||||
void BufferParams::readLanguage(Lexer & lex)
|
||||
{
|
||||
if (!lex.next()) return;
|
||||
|
||||
@ -1215,7 +1215,7 @@ void BufferParams::readLanguage(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::readGraphicsDriver(LyXLex & lex)
|
||||
void BufferParams::readGraphicsDriver(Lexer & lex)
|
||||
{
|
||||
if (!lex.next()) return;
|
||||
|
||||
@ -1239,7 +1239,7 @@ void BufferParams::readGraphicsDriver(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::readBullets(LyXLex & lex)
|
||||
void BufferParams::readBullets(Lexer & lex)
|
||||
{
|
||||
if (!lex.next()) return;
|
||||
|
||||
@ -1257,7 +1257,7 @@ void BufferParams::readBullets(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void BufferParams::readBulletsLaTeX(LyXLex & lex)
|
||||
void BufferParams::readBulletsLaTeX(Lexer & lex)
|
||||
{
|
||||
// The bullet class should be able to read this.
|
||||
if (!lex.next()) return;
|
||||
|
@ -34,7 +34,7 @@ class AuthorList;
|
||||
class BranchList;
|
||||
class Bullet;
|
||||
class Encoding;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class LatexFeatures;
|
||||
class Spacing;
|
||||
class TexRow;
|
||||
@ -61,7 +61,7 @@ public:
|
||||
~BufferParams();
|
||||
|
||||
/// read a header token, if unrecognised, return it or an unknown class name
|
||||
std::string const readToken(LyXLex & lex, std::string const & token);
|
||||
std::string const readToken(Lexer & lex, std::string const & token);
|
||||
|
||||
///
|
||||
void writeFile(std::ostream &) const;
|
||||
@ -197,15 +197,15 @@ public:
|
||||
Bullet & user_defined_bullet(size_type index);
|
||||
Bullet const & user_defined_bullet(size_type index) const;
|
||||
///
|
||||
void readPreamble(LyXLex &);
|
||||
void readPreamble(Lexer &);
|
||||
///
|
||||
void readLanguage(LyXLex &);
|
||||
void readLanguage(Lexer &);
|
||||
///
|
||||
void readGraphicsDriver(LyXLex &);
|
||||
void readGraphicsDriver(Lexer &);
|
||||
///
|
||||
void readBullets(LyXLex &);
|
||||
void readBullets(Lexer &);
|
||||
///
|
||||
void readBulletsLaTeX(LyXLex &);
|
||||
void readBulletsLaTeX(Lexer &);
|
||||
|
||||
/// Whether to load a package such as amsmath or esint.
|
||||
/// The enum values must not be changed (file format!)
|
||||
|
@ -7043,12 +7043,12 @@
|
||||
|
||||
* bufferparams.h: add compressed var
|
||||
|
||||
* buffer_funcs.C (readFile): adjust for LyXLex change
|
||||
* buffer_funcs.C (readFile): adjust for Lexer change
|
||||
(newFile): ditto + simplify
|
||||
|
||||
* buffer.C (writeFile): handle writing of compressed files
|
||||
|
||||
* buffer.[Ch] (readFile): begin LyXLex here, remove one argument.
|
||||
* buffer.[Ch] (readFile): begin Lexer here, remove one argument.
|
||||
Check if the file is compressed and set a bufferparm if so.
|
||||
|
||||
* Makefile.am (lyx_LDADD): remove explicit -lz
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class TeXErrors;
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
#include "support/FileName.h"
|
||||
@ -278,7 +278,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
||||
{
|
||||
// We must read the symbolsfile first, because the Encoding
|
||||
// constructor depends on it.
|
||||
LyXLex symbolslex(0, 0);
|
||||
Lexer symbolslex(0, 0);
|
||||
symbolslex.setFile(symbolsfile);
|
||||
while (symbolslex.isOK()) {
|
||||
char_type symbol;
|
||||
@ -348,7 +348,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
||||
{ "end", et_end }
|
||||
};
|
||||
|
||||
LyXLex lex(encodingtags, et_last - 1);
|
||||
Lexer lex(encodingtags, et_last - 1);
|
||||
lex.setFile(encfile);
|
||||
while (lex.isOK()) {
|
||||
switch (lex.lex()) {
|
||||
@ -370,7 +370,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
|
||||
case et_end:
|
||||
lex.printError("Encodings::read: Misplaced end");
|
||||
break;
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
break;
|
||||
default:
|
||||
lex.printError("Encodings::read: "
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "FloatList.h"
|
||||
#include "LColor.h"
|
||||
#include "Language.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "lyx_sty.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
@ -76,7 +76,7 @@ void LaTeXFeatures::require(string const & name)
|
||||
|
||||
void LaTeXFeatures::getAvailable()
|
||||
{
|
||||
LyXLex lex(0, 0);
|
||||
Lexer lex(0, 0);
|
||||
support::FileName const real_file = libFileSearch("", "packages.lst");
|
||||
|
||||
if (real_file.empty())
|
||||
@ -94,7 +94,7 @@ void LaTeXFeatures::getAvailable()
|
||||
// Parse config-file
|
||||
while (lex.isOK() && !finished) {
|
||||
switch (lex.lex()) {
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
finished = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "Encoding.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
#include "support/FileName.h"
|
||||
@ -44,7 +44,7 @@ void Languages::read(support::FileName const & filename)
|
||||
encodings.getFromLyXName("iso8859-1"),
|
||||
"latex", "");
|
||||
|
||||
LyXLex lex(0, 0);
|
||||
Lexer lex(0, 0);
|
||||
lex.setFile(filename);
|
||||
while (lex.isOK()) {
|
||||
string lang;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* \file LyXLex.cpp
|
||||
* \file Lexer.cpp
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
@ -64,13 +64,13 @@ using std::ostream;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LyXLex::Pimpl
|
||||
// Lexer::Pimpl
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
///
|
||||
class LyXLex::Pimpl : boost::noncopyable {
|
||||
class Lexer::Pimpl : boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
Pimpl(keyword_item * tab, int num);
|
||||
@ -171,7 +171,7 @@ public:
|
||||
} // end of anon namespace
|
||||
|
||||
|
||||
LyXLex::Pimpl::Pimpl(keyword_item * tab, int num)
|
||||
Lexer::Pimpl::Pimpl(keyword_item * tab, int num)
|
||||
: is(&fb_), table(tab), no_items(num),
|
||||
status(0), lineno(0), commentChar('#')
|
||||
{
|
||||
@ -179,19 +179,19 @@ LyXLex::Pimpl::Pimpl(keyword_item * tab, int num)
|
||||
}
|
||||
|
||||
|
||||
string const LyXLex::Pimpl::getString() const
|
||||
string const Lexer::Pimpl::getString() const
|
||||
{
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
||||
docstring const LyXLex::Pimpl::getDocString() const
|
||||
docstring const Lexer::Pimpl::getDocString() const
|
||||
{
|
||||
return from_utf8(buff);
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::printError(string const & message) const
|
||||
void Lexer::Pimpl::printError(string const & message) const
|
||||
{
|
||||
string const tmpmsg = subst(message, "$$Token", getString());
|
||||
lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
|
||||
@ -199,7 +199,7 @@ void LyXLex::Pimpl::printError(string const & message) const
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::printTable(ostream & os)
|
||||
void Lexer::Pimpl::printTable(ostream & os)
|
||||
{
|
||||
os << "\nNumber of tags: " << no_items << endl;
|
||||
for (int i= 0; i < no_items; ++i)
|
||||
@ -210,12 +210,12 @@ void LyXLex::Pimpl::printTable(ostream & os)
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::verifyTable()
|
||||
void Lexer::Pimpl::verifyTable()
|
||||
{
|
||||
// Check if the table is sorted and if not, sort it.
|
||||
if (table
|
||||
&& !lyx::sorted(table, table + no_items, compare_tags())) {
|
||||
lyxerr << "The table passed to LyXLex is not sorted!\n"
|
||||
lyxerr << "The table passed to Lexer is not sorted!\n"
|
||||
<< "Tell the developers to fix it!" << endl;
|
||||
// We sort it anyway to avoid problems.
|
||||
lyxerr << "\nUnsorted:" << endl;
|
||||
@ -228,7 +228,7 @@ void LyXLex::Pimpl::verifyTable()
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::pushTable(keyword_item * tab, int num)
|
||||
void Lexer::Pimpl::pushTable(keyword_item * tab, int num)
|
||||
{
|
||||
pushed_table tmppu(table, no_items);
|
||||
pushed.push(tmppu);
|
||||
@ -240,10 +240,10 @@ void LyXLex::Pimpl::pushTable(keyword_item * tab, int num)
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::popTable()
|
||||
void Lexer::Pimpl::popTable()
|
||||
{
|
||||
if (pushed.empty()) {
|
||||
lyxerr << "LyXLex error: nothing to pop!" << endl;
|
||||
lyxerr << "Lexer error: nothing to pop!" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ void LyXLex::Pimpl::popTable()
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
bool Lexer::Pimpl::setFile(FileName const & filename)
|
||||
{
|
||||
// Check the format of the file.
|
||||
string const format = getFormatFromContents(filename);
|
||||
@ -266,7 +266,7 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
|
||||
// a fresh new filebuf. (JMarc)
|
||||
if (!gz_.empty() || istream::off_type(is.tellg()) > -1)
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setFile: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in Lexer::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
gz_.push(io::gzip_decompressor());
|
||||
gz_.push(io::file_source(filename.toFilesystemEncoding()));
|
||||
@ -281,7 +281,7 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
// a bug in compaq cxx 6.2, where is_open() returns 'true' for
|
||||
// a fresh new filebuf. (JMarc)
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setFile: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in Lexer::setFile: "
|
||||
"file or stream already set." << endl;
|
||||
fb_.open(filename.toFilesystemEncoding().c_str(), ios::in);
|
||||
is.rdbuf(&fb_);
|
||||
@ -292,23 +292,23 @@ bool LyXLex::Pimpl::setFile(FileName const & filename)
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::setStream(istream & i)
|
||||
void Lexer::Pimpl::setStream(istream & i)
|
||||
{
|
||||
if (fb_.is_open() || istream::off_type(is.tellg()) > 0)
|
||||
LYXERR(Debug::LYXLEX) << "Error in LyXLex::setStream: "
|
||||
LYXERR(Debug::LYXLEX) << "Error in Lexer::setStream: "
|
||||
"file or stream already set." << endl;
|
||||
is.rdbuf(i.rdbuf());
|
||||
lineno = 0;
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::setCommentChar(char c)
|
||||
void Lexer::Pimpl::setCommentChar(char c)
|
||||
{
|
||||
commentChar = c;
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::Pimpl::next(bool esc /* = false */)
|
||||
bool Lexer::Pimpl::next(bool esc /* = false */)
|
||||
{
|
||||
if (!pushTok.empty()) {
|
||||
// There can have been a whole line pushed so
|
||||
@ -506,7 +506,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
|
||||
}
|
||||
|
||||
|
||||
int LyXLex::Pimpl::search_kw(char const * const tag) const
|
||||
int Lexer::Pimpl::search_kw(char const * const tag) const
|
||||
{
|
||||
keyword_item search_tag = { tag, 0 };
|
||||
keyword_item * res =
|
||||
@ -522,7 +522,7 @@ int LyXLex::Pimpl::search_kw(char const * const tag) const
|
||||
}
|
||||
|
||||
|
||||
int LyXLex::Pimpl::lex()
|
||||
int Lexer::Pimpl::lex()
|
||||
{
|
||||
//NOTE: possible bug.
|
||||
if (next() && status == LEX_TOKEN)
|
||||
@ -531,7 +531,7 @@ int LyXLex::Pimpl::lex()
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::Pimpl::eatLine()
|
||||
bool Lexer::Pimpl::eatLine()
|
||||
{
|
||||
buff.clear();
|
||||
|
||||
@ -540,7 +540,7 @@ bool LyXLex::Pimpl::eatLine()
|
||||
while (is && c != '\n') {
|
||||
is.get(cc);
|
||||
c = cc;
|
||||
//LYXERR(Debug::LYXLEX) << "LyXLex::EatLine read char: `"
|
||||
//LYXERR(Debug::LYXLEX) << "Lexer::EatLine read char: `"
|
||||
// << c << '\'' << endl;
|
||||
if (c != '\r')
|
||||
buff.push_back(c);
|
||||
@ -560,7 +560,7 @@ bool LyXLex::Pimpl::eatLine()
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::Pimpl::nextToken()
|
||||
bool Lexer::Pimpl::nextToken()
|
||||
{
|
||||
if (!pushTok.empty()) {
|
||||
// There can have been a whole line pushed so
|
||||
@ -617,13 +617,13 @@ bool LyXLex::Pimpl::nextToken()
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::Pimpl::inputAvailable()
|
||||
bool Lexer::Pimpl::inputAvailable()
|
||||
{
|
||||
return is.good();
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::Pimpl::pushToken(string const & pt)
|
||||
void Lexer::Pimpl::pushToken(string const & pt)
|
||||
{
|
||||
pushTok = pt;
|
||||
}
|
||||
@ -633,93 +633,93 @@ void LyXLex::Pimpl::pushToken(string const & pt)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LyXLex
|
||||
// Lexer
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
LyXLex::LyXLex(keyword_item * tab, int num)
|
||||
Lexer::Lexer(keyword_item * tab, int num)
|
||||
: pimpl_(new Pimpl(tab, num))
|
||||
{}
|
||||
|
||||
|
||||
LyXLex::~LyXLex()
|
||||
Lexer::~Lexer()
|
||||
{
|
||||
delete pimpl_;
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::isOK() const
|
||||
bool Lexer::isOK() const
|
||||
{
|
||||
return pimpl_->inputAvailable();
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::setLineNo(int l)
|
||||
void Lexer::setLineNo(int l)
|
||||
{
|
||||
pimpl_->lineno = l;
|
||||
}
|
||||
|
||||
|
||||
int LyXLex::getLineNo() const
|
||||
int Lexer::getLineNo() const
|
||||
{
|
||||
return pimpl_->lineno;
|
||||
}
|
||||
|
||||
|
||||
istream & LyXLex::getStream()
|
||||
istream & Lexer::getStream()
|
||||
{
|
||||
return pimpl_->is;
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::pushTable(keyword_item * tab, int num)
|
||||
void Lexer::pushTable(keyword_item * tab, int num)
|
||||
{
|
||||
pimpl_->pushTable(tab, num);
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::popTable()
|
||||
void Lexer::popTable()
|
||||
{
|
||||
pimpl_->popTable();
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::printTable(ostream & os)
|
||||
void Lexer::printTable(ostream & os)
|
||||
{
|
||||
pimpl_->printTable(os);
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::printError(string const & message) const
|
||||
void Lexer::printError(string const & message) const
|
||||
{
|
||||
pimpl_->printError(message);
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::setFile(support::FileName const & filename)
|
||||
bool Lexer::setFile(support::FileName const & filename)
|
||||
{
|
||||
return pimpl_->setFile(filename);
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::setStream(istream & i)
|
||||
void Lexer::setStream(istream & i)
|
||||
{
|
||||
pimpl_->setStream(i);
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::setCommentChar(char c)
|
||||
void Lexer::setCommentChar(char c)
|
||||
{
|
||||
pimpl_->setCommentChar(c);
|
||||
}
|
||||
|
||||
int LyXLex::lex()
|
||||
int Lexer::lex()
|
||||
{
|
||||
return pimpl_->lex();
|
||||
}
|
||||
|
||||
|
||||
int LyXLex::getInteger() const
|
||||
int Lexer::getInteger() const
|
||||
{
|
||||
lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
|
||||
if (!lastReadOk_) {
|
||||
@ -736,7 +736,7 @@ int LyXLex::getInteger() const
|
||||
}
|
||||
|
||||
|
||||
double LyXLex::getFloat() const
|
||||
double Lexer::getFloat() const
|
||||
{
|
||||
// replace comma with dot in case the file was written with
|
||||
// the wrong locale (should be rare, but is easy enough to
|
||||
@ -757,7 +757,7 @@ double LyXLex::getFloat() const
|
||||
}
|
||||
|
||||
|
||||
string const LyXLex::getString() const
|
||||
string const Lexer::getString() const
|
||||
{
|
||||
lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
|
||||
|
||||
@ -768,7 +768,7 @@ string const LyXLex::getString() const
|
||||
}
|
||||
|
||||
|
||||
docstring const LyXLex::getDocString() const
|
||||
docstring const Lexer::getDocString() const
|
||||
{
|
||||
lastReadOk_ = pimpl_->status == LEX_DATA || pimpl_->status == LEX_TOKEN;
|
||||
|
||||
@ -782,7 +782,7 @@ docstring const LyXLex::getDocString() const
|
||||
// I would prefer to give a tag number instead of an explicit token
|
||||
// here, but it is not possible because Buffer::readDocument uses
|
||||
// explicit tokens (JMarc)
|
||||
string const LyXLex::getLongString(string const & endtoken)
|
||||
string const Lexer::getLongString(string const & endtoken)
|
||||
{
|
||||
string str, prefix;
|
||||
bool firstline = true;
|
||||
@ -828,7 +828,7 @@ string const LyXLex::getLongString(string const & endtoken)
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::getBool() const
|
||||
bool Lexer::getBool() const
|
||||
{
|
||||
if (pimpl_->getString() == "true") {
|
||||
lastReadOk_ = true;
|
||||
@ -843,31 +843,31 @@ bool LyXLex::getBool() const
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::eatLine()
|
||||
bool Lexer::eatLine()
|
||||
{
|
||||
return pimpl_->eatLine();
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::next(bool esc)
|
||||
bool Lexer::next(bool esc)
|
||||
{
|
||||
return pimpl_->next(esc);
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::nextToken()
|
||||
bool Lexer::nextToken()
|
||||
{
|
||||
return pimpl_->nextToken();
|
||||
}
|
||||
|
||||
|
||||
void LyXLex::pushToken(string const & pt)
|
||||
void Lexer::pushToken(string const & pt)
|
||||
{
|
||||
pimpl_->pushToken(pt);
|
||||
}
|
||||
|
||||
|
||||
LyXLex::operator void const *() const
|
||||
Lexer::operator void const *() const
|
||||
{
|
||||
// This behaviour is NOT the same as the std::streams which would
|
||||
// use fail() here. However, our implementation of getString() et al.
|
||||
@ -877,13 +877,13 @@ LyXLex::operator void const *() const
|
||||
}
|
||||
|
||||
|
||||
bool LyXLex::operator!() const
|
||||
bool Lexer::operator!() const
|
||||
{
|
||||
return !lastReadOk_;
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(std::string & s)
|
||||
Lexer & Lexer::operator>>(std::string & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -895,7 +895,7 @@ LyXLex & LyXLex::operator>>(std::string & s)
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(docstring & s)
|
||||
Lexer & Lexer::operator>>(docstring & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -907,7 +907,7 @@ LyXLex & LyXLex::operator>>(docstring & s)
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(double & s)
|
||||
Lexer & Lexer::operator>>(double & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -919,7 +919,7 @@ LyXLex & LyXLex::operator>>(double & s)
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(int & s)
|
||||
Lexer & Lexer::operator>>(int & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -931,7 +931,7 @@ LyXLex & LyXLex::operator>>(int & s)
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(unsigned int & s)
|
||||
Lexer & Lexer::operator>>(unsigned int & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -943,7 +943,7 @@ LyXLex & LyXLex::operator>>(unsigned int & s)
|
||||
}
|
||||
|
||||
|
||||
LyXLex & LyXLex::operator>>(bool & s)
|
||||
Lexer & Lexer::operator>>(bool & s)
|
||||
{
|
||||
if (isOK()) {
|
||||
next();
|
||||
@ -956,7 +956,7 @@ LyXLex & LyXLex::operator>>(bool & s)
|
||||
|
||||
|
||||
/// quotes a string, e.g. for use in preferences files or as an argument of the "log" dialog
|
||||
string const LyXLex::quoteString(string const & arg)
|
||||
string const Lexer::quoteString(string const & arg)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << '"' << subst(subst(arg, "\\", "\\\\"), "\"", "\\\"") << '"';
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file LyXLex.h
|
||||
* \file Lexer.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
@ -14,8 +14,8 @@
|
||||
// It can be used for simple syntax parsers, like lyxrc,
|
||||
// texclass and others to come.
|
||||
|
||||
#ifndef LYXLEX_H
|
||||
#define LYXLEX_H
|
||||
#ifndef LEXER_H
|
||||
#define LEXER_H
|
||||
|
||||
#include "support/docstring.h"
|
||||
|
||||
@ -55,12 +55,12 @@ struct keyword_item {
|
||||
|
||||
@see LyXRC.cpp for an example of usage.
|
||||
*/
|
||||
class LyXLex : boost::noncopyable {
|
||||
class Lexer : boost::noncopyable {
|
||||
public:
|
||||
///
|
||||
LyXLex(keyword_item *, int);
|
||||
Lexer(keyword_item *, int);
|
||||
///
|
||||
~LyXLex();
|
||||
~Lexer();
|
||||
|
||||
/// Lex basic codes
|
||||
enum {
|
||||
@ -158,19 +158,19 @@ public:
|
||||
void printTable(std::ostream &);
|
||||
|
||||
/// extract string
|
||||
LyXLex & operator>>(std::string &);
|
||||
Lexer & operator>>(std::string &);
|
||||
/// extract docstring
|
||||
LyXLex & operator>>(docstring &);
|
||||
Lexer & operator>>(docstring &);
|
||||
/// extract double
|
||||
LyXLex & operator>>(double &);
|
||||
Lexer & operator>>(double &);
|
||||
/// extract integer
|
||||
LyXLex & operator>>(int &);
|
||||
Lexer & operator>>(int &);
|
||||
/// extract unsigned integer
|
||||
LyXLex & operator>>(unsigned int &);
|
||||
Lexer & operator>>(unsigned int &);
|
||||
/// extract bool
|
||||
LyXLex & operator>>(bool &);
|
||||
Lexer & operator>>(bool &);
|
||||
|
||||
/// Quotes a string so that reading it again with LyXLex::next(true)
|
||||
/// Quotes a string so that reading it again with Lexer::next(true)
|
||||
/// gets the original string
|
||||
static std::string const quoteString(std::string const &);
|
||||
|
||||
@ -189,25 +189,25 @@ private:
|
||||
exceptions.
|
||||
@author Lgb
|
||||
*/
|
||||
class pushpophelper {
|
||||
class PushPopHelper {
|
||||
public:
|
||||
///
|
||||
pushpophelper(LyXLex & lexrc, keyword_item * i, int s) : lex(lexrc) {
|
||||
PushPopHelper(Lexer & lexrc, keyword_item * i, int s) : lex(lexrc) {
|
||||
lex.pushTable(i, s);
|
||||
}
|
||||
///
|
||||
~pushpophelper() {
|
||||
~PushPopHelper() {
|
||||
lex.popTable();
|
||||
}
|
||||
///
|
||||
LyXLex & lex;
|
||||
Lexer & lex;
|
||||
};
|
||||
/** Avoid wrong usage of pushpophelper.
|
||||
/** Avoid wrong usage of PushPopHelper.
|
||||
To avoid wrong usage:
|
||||
pushpophelper(...); // wrong
|
||||
pushpophelper pph(...); // right
|
||||
PushPopHelper(...); // wrong
|
||||
PushPopHelper pph(...); // right
|
||||
*/
|
||||
#define pushpophelper(x, y, z) unnamed_pushpophelper;
|
||||
#define PushPopHelper(x, y, z) unnamed_PushPopHelper;
|
||||
// Tip gotten from Bobby Schmidt's column in C/C++ Users Journal
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "lyx_cb.h"
|
||||
#include "LyXAction.h"
|
||||
#include "LyXFunc.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXServer.h"
|
||||
#include "LyXServerSocket.h"
|
||||
@ -1179,7 +1179,7 @@ bool LyX::readUIFile(string const & name, bool include)
|
||||
|
||||
LYXERR(Debug::INIT) << "Found " << name
|
||||
<< " in " << ui_path << endl;
|
||||
LyXLex lex(uitags, ui_last - 1);
|
||||
Lexer lex(uitags, ui_last - 1);
|
||||
lex.setFile(ui_path);
|
||||
if (!lex.isOK()) {
|
||||
lyxerr << "Unable to set LyXLeX for ui file: " << ui_path
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
@ -626,7 +626,7 @@ string const LyXFont::latexSize() const
|
||||
|
||||
// Read a font definition from given file in lyx format
|
||||
// Used for layouts
|
||||
LyXFont & LyXFont::lyxRead(LyXLex & lex)
|
||||
LyXFont & LyXFont::lyxRead(Lexer & lex)
|
||||
{
|
||||
bool error = false;
|
||||
bool finished = false;
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace lyx {
|
||||
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class BufferParams;
|
||||
class Language;
|
||||
|
||||
@ -288,8 +288,8 @@ public:
|
||||
/// Is a given font fully resolved?
|
||||
bool resolved() const;
|
||||
|
||||
/// Read a font specification from LyXLex. Used for layout files.
|
||||
LyXFont & lyxRead(LyXLex &);
|
||||
/// Read a font specification from Lexer. Used for layout files.
|
||||
LyXFont & lyxRead(Lexer &);
|
||||
|
||||
/// Writes the changes from this font to orgfont in .lyx format in file
|
||||
void lyxWriteChanges(LyXFont const & orgfont, std::ostream &) const;
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "lyx_cb.h"
|
||||
#include "LyXAction.h"
|
||||
#include "lyxfind.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "Row.h"
|
||||
#include "LyXServer.h"
|
||||
@ -1271,11 +1271,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
data = "literate ";
|
||||
break;
|
||||
}
|
||||
data += LyXLex::quoteString(logfile.second);
|
||||
data += Lexer::quoteString(logfile.second);
|
||||
lyx_view_->getDialogs().show("log", data);
|
||||
} else if (name == "vclog") {
|
||||
string const data = "vc " +
|
||||
LyXLex::quoteString(lyx_view_->buffer()->lyxvc().getLogFile());
|
||||
Lexer::quoteString(lyx_view_->buffer()->lyxvc().getLogFile());
|
||||
lyx_view_->getDialogs().show("log", data);
|
||||
} else
|
||||
lyx_view_->getDialogs().show(name, data);
|
||||
@ -1596,7 +1596,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
Buffer defaults(fname);
|
||||
|
||||
istringstream ss(argument);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(ss);
|
||||
int const unknown_tokens = defaults.readHeader(lex);
|
||||
|
||||
@ -1621,7 +1621,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
lyx_view_->buffer()->params().getEngine();
|
||||
|
||||
istringstream ss(argument);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(ss);
|
||||
int const unknown_tokens =
|
||||
lyx_view_->buffer()->readHeader(lex);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "LyXLayout.h"
|
||||
#include "LyXTextClass.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "debug.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
@ -132,7 +132,7 @@ LyXLayout::LyXLayout ()
|
||||
|
||||
|
||||
// Reads a layout definition from file
|
||||
bool LyXLayout::read(LyXLex & lexrc, LyXTextClass const & tclass)
|
||||
bool LyXLayout::read(Lexer & lexrc, LyXTextClass const & tclass)
|
||||
{
|
||||
// This table is sorted alphabetically [asierra 30March96]
|
||||
keyword_item layoutTags[] = {
|
||||
@ -196,10 +196,10 @@ bool LyXLayout::read(LyXLex & lexrc, LyXTextClass const & tclass)
|
||||
int le = lexrc.lex();
|
||||
// See comment in LyXRC.cpp.
|
||||
switch (le) {
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
continue;
|
||||
|
||||
case LyXLex::LEX_UNDEF: // parse error
|
||||
case Lexer::LEX_UNDEF: // parse error
|
||||
lexrc.printError("Unknown layout tag `$$Token'");
|
||||
error = true;
|
||||
continue;
|
||||
@ -501,7 +501,7 @@ enum AlignTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXLayout::readAlign(LyXLex & lexrc)
|
||||
void LyXLayout::readAlign(Lexer & lexrc)
|
||||
{
|
||||
keyword_item alignTags[] = {
|
||||
{ "block", AT_BLOCK },
|
||||
@ -511,10 +511,10 @@ void LyXLayout::readAlign(LyXLex & lexrc)
|
||||
{ "right", AT_RIGHT }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, alignTags, AT_LAYOUT);
|
||||
PushPopHelper pph(lexrc, alignTags, AT_LAYOUT);
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown alignment `$$Token'");
|
||||
return;
|
||||
default: break;
|
||||
@ -539,7 +539,7 @@ void LyXLayout::readAlign(LyXLex & lexrc)
|
||||
}
|
||||
|
||||
|
||||
void LyXLayout::readAlignPossible(LyXLex & lexrc)
|
||||
void LyXLayout::readAlignPossible(Lexer & lexrc)
|
||||
{
|
||||
keyword_item alignTags[] = {
|
||||
{ "block", AT_BLOCK },
|
||||
@ -555,7 +555,7 @@ void LyXLayout::readAlignPossible(LyXLex & lexrc)
|
||||
do {
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown alignment `$$Token'");
|
||||
continue;
|
||||
default: break;
|
||||
@ -596,7 +596,7 @@ enum LabelTypeTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXLayout::readLabelType(LyXLex & lexrc)
|
||||
void LyXLayout::readLabelType(Lexer & lexrc)
|
||||
{
|
||||
keyword_item labelTypeTags[] = {
|
||||
{ "bibliography", LA_BIBLIO },
|
||||
@ -611,10 +611,10 @@ void LyXLayout::readLabelType(LyXLex & lexrc)
|
||||
{ "top_environment", LA_TOP_ENVIRONMENT }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, labelTypeTags, LA_BIBLIO);
|
||||
PushPopHelper pph(lexrc, labelTypeTags, LA_BIBLIO);
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown labeltype tag `$$Token'");
|
||||
return;
|
||||
default: break;
|
||||
@ -666,13 +666,13 @@ keyword_item endlabelTypeTags[] = {
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void LyXLayout::readEndLabelType(LyXLex & lexrc)
|
||||
void LyXLayout::readEndLabelType(Lexer & lexrc)
|
||||
{
|
||||
pushpophelper pph(lexrc, endlabelTypeTags,
|
||||
PushPopHelper pph(lexrc, endlabelTypeTags,
|
||||
END_LABEL_ENUM_LAST-END_LABEL_ENUM_FIRST+1);
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown labeltype tag `$$Token'");
|
||||
break;
|
||||
case END_LABEL_STATIC:
|
||||
@ -689,7 +689,7 @@ void LyXLayout::readEndLabelType(LyXLex & lexrc)
|
||||
}
|
||||
|
||||
|
||||
void LyXLayout::readMargin(LyXLex & lexrc)
|
||||
void LyXLayout::readMargin(Lexer & lexrc)
|
||||
{
|
||||
keyword_item marginTags[] = {
|
||||
{ "dynamic", MARGIN_DYNAMIC },
|
||||
@ -699,11 +699,11 @@ void LyXLayout::readMargin(LyXLex & lexrc)
|
||||
{ "static", MARGIN_STATIC }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, marginTags, MARGIN_RIGHT_ADDRESS_BOX);
|
||||
PushPopHelper pph(lexrc, marginTags, MARGIN_RIGHT_ADDRESS_BOX);
|
||||
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown margin type tag `$$Token'");
|
||||
return;
|
||||
case MARGIN_STATIC:
|
||||
@ -721,7 +721,7 @@ void LyXLayout::readMargin(LyXLex & lexrc)
|
||||
}
|
||||
|
||||
|
||||
void LyXLayout::readLatexType(LyXLex & lexrc)
|
||||
void LyXLayout::readLatexType(Lexer & lexrc)
|
||||
{
|
||||
keyword_item latexTypeTags[] = {
|
||||
{ "bib_environment", LATEX_BIB_ENVIRONMENT },
|
||||
@ -732,10 +732,10 @@ void LyXLayout::readLatexType(LyXLex & lexrc)
|
||||
{ "paragraph", LATEX_PARAGRAPH }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, latexTypeTags, LATEX_LIST_ENVIRONMENT);
|
||||
PushPopHelper pph(lexrc, latexTypeTags, LATEX_LIST_ENVIRONMENT);
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown latextype tag `$$Token'");
|
||||
return;
|
||||
case LATEX_PARAGRAPH:
|
||||
@ -762,7 +762,7 @@ enum SpacingTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXLayout::readSpacing(LyXLex & lexrc)
|
||||
void LyXLayout::readSpacing(Lexer & lexrc)
|
||||
{
|
||||
keyword_item spacingTags[] = {
|
||||
{"double", ST_SPACING_DOUBLE },
|
||||
@ -771,10 +771,10 @@ void LyXLayout::readSpacing(LyXLex & lexrc)
|
||||
{"single", ST_SPACING_SINGLE }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, spacingTags, ST_OTHER);
|
||||
PushPopHelper pph(lexrc, spacingTags, ST_OTHER);
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown spacing token `$$Token'");
|
||||
return;
|
||||
default: break;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class LyXTextClass;
|
||||
|
||||
///
|
||||
@ -33,21 +33,21 @@ public:
|
||||
///
|
||||
LyXLayout();
|
||||
///
|
||||
bool read(LyXLex &, LyXTextClass const &);
|
||||
bool read(Lexer &, LyXTextClass const &);
|
||||
///
|
||||
void readAlign(LyXLex &);
|
||||
void readAlign(Lexer &);
|
||||
///
|
||||
void readAlignPossible(LyXLex &);
|
||||
void readAlignPossible(Lexer &);
|
||||
///
|
||||
void readLabelType(LyXLex &);
|
||||
void readLabelType(Lexer &);
|
||||
///
|
||||
void readEndLabelType(LyXLex &);
|
||||
void readEndLabelType(Lexer &);
|
||||
///
|
||||
void readMargin(LyXLex &);
|
||||
void readMargin(Lexer &);
|
||||
///
|
||||
void readLatexType(LyXLex &);
|
||||
void readLatexType(Lexer &);
|
||||
///
|
||||
void readSpacing(LyXLex &);
|
||||
void readSpacing(Lexer &);
|
||||
///
|
||||
std::string const & name() const;
|
||||
///
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Session.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXFont.h"
|
||||
#include "Mover.h"
|
||||
|
||||
@ -303,7 +303,7 @@ void oldFontFormat(string & family, string & foundry)
|
||||
|
||||
int LyXRC::read(FileName const & filename)
|
||||
{
|
||||
LyXLex lexrc(lyxrcTags, lyxrcCount);
|
||||
Lexer lexrc(lyxrcTags, lyxrcCount);
|
||||
if (lyxerr.debugging(Debug::PARSER))
|
||||
lexrc.printTable(lyxerr);
|
||||
|
||||
@ -318,7 +318,7 @@ int LyXRC::read(FileName const & filename)
|
||||
|
||||
int LyXRC::read(std::istream & is)
|
||||
{
|
||||
LyXLex lexrc(lyxrcTags, lyxrcCount);
|
||||
Lexer lexrc(lyxrcTags, lyxrcCount);
|
||||
if (lyxerr.debugging(Debug::PARSER))
|
||||
lexrc.printTable(lyxerr);
|
||||
|
||||
@ -331,7 +331,7 @@ int LyXRC::read(std::istream & is)
|
||||
}
|
||||
|
||||
|
||||
int LyXRC::read(LyXLex & lexrc)
|
||||
int LyXRC::read(Lexer & lexrc)
|
||||
{
|
||||
if (!lexrc.isOK()) return -2;
|
||||
|
||||
@ -339,16 +339,16 @@ int LyXRC::read(LyXLex & lexrc)
|
||||
// By using two switches we take advantage of the compiler
|
||||
// telling us if we have missed a LyXRCTags element in
|
||||
// the second switch.
|
||||
// Note that this also shows a problem with LyXLex since it
|
||||
// Note that this also shows a problem with Lexer since it
|
||||
// helps us avoid taking advantage of the strictness of the
|
||||
// compiler.
|
||||
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown tag `$$Token'");
|
||||
continue;
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
continue;
|
||||
default: break;
|
||||
}
|
||||
@ -1053,9 +1053,9 @@ int LyXRC::read(LyXLex & lexrc)
|
||||
// Hack to ensure compatibility with versions older
|
||||
// than 1.5.0
|
||||
int le = lexrc.lex();
|
||||
if (le != LyXLex::LEX_FEOF && le != LyXLex::LEX_UNDEF) {
|
||||
if (le != Lexer::LEX_FEOF && le != Lexer::LEX_UNDEF) {
|
||||
flags = lexrc.getString();
|
||||
if (le != LyXLex::LEX_DATA) {
|
||||
if (le != Lexer::LEX_DATA) {
|
||||
// We have got a known token.
|
||||
// Therefore this is an old style
|
||||
// format definition without
|
||||
|
@ -29,7 +29,7 @@ namespace lyx {
|
||||
|
||||
namespace support { class FileName; }
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
/// This contains the runtime configuration of LyX
|
||||
class LyXRC //: public noncopyable
|
||||
@ -155,7 +155,7 @@ public:
|
||||
int read(std::istream &);
|
||||
private:
|
||||
///
|
||||
int read(LyXLex &);
|
||||
int read(Lexer &);
|
||||
public:
|
||||
///
|
||||
void write(support::FileName const & filename,
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "LCursor.h"
|
||||
#include "debug.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
#include "paragraph_funcs.h"
|
||||
@ -1342,7 +1342,7 @@ void LyXTabular::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void LyXTabular::read(Buffer const & buf, LyXLex & lex)
|
||||
void LyXTabular::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
string line;
|
||||
istream & is = lex.getStream();
|
||||
|
@ -311,7 +311,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex &);
|
||||
void read(Buffer const &, Lexer &);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &, OutputParams const &) const;
|
||||
//
|
||||
|
@ -334,7 +334,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
/// returns whether we've seen our usual 'end' marker
|
||||
bool read(Buffer const & buf, LyXLex & lex, ErrorList & errorList);
|
||||
bool read(Buffer const & buf, Lexer & lex, ErrorList & errorList);
|
||||
|
||||
///
|
||||
/// FIXME: move to TextMetrics.
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "LyXTextClass.h"
|
||||
#include "debug.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Counters.h"
|
||||
#include "Floating.h"
|
||||
#include "FloatList.h"
|
||||
@ -125,7 +125,7 @@ bool LyXTextClass::isTeXClassAvailable() const
|
||||
}
|
||||
|
||||
|
||||
bool LyXTextClass::do_readStyle(LyXLex & lexrc, LyXLayout & lay)
|
||||
bool LyXTextClass::do_readStyle(Lexer & lexrc, LyXLayout & lay)
|
||||
{
|
||||
LYXERR(Debug::TCLASS) << "Reading style " << lay.name() << endl;
|
||||
if (!lay.read(lexrc, *this)) {
|
||||
@ -214,7 +214,7 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
<< to_utf8(makeDisplayPath(filename.absFilename()))
|
||||
<< endl;
|
||||
|
||||
LyXLex lexrc(textClassTags,
|
||||
Lexer lexrc(textClassTags,
|
||||
sizeof(textClassTags) / sizeof(textClassTags[0]));
|
||||
|
||||
lexrc.setFile(filename);
|
||||
@ -228,10 +228,10 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
int le = lexrc.lex();
|
||||
|
||||
switch (le) {
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
continue;
|
||||
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown TextClass tag `$$Token'");
|
||||
error = true;
|
||||
continue;
|
||||
@ -476,18 +476,18 @@ bool LyXTextClass::read(FileName const & filename, bool merge)
|
||||
}
|
||||
|
||||
|
||||
void LyXTextClass::readTitleType(LyXLex & lexrc)
|
||||
void LyXTextClass::readTitleType(Lexer & lexrc)
|
||||
{
|
||||
keyword_item titleTypeTags[] = {
|
||||
{ "commandafter", TITLE_COMMAND_AFTER },
|
||||
{ "environment", TITLE_ENVIRONMENT }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, titleTypeTags, TITLE_ENVIRONMENT);
|
||||
PushPopHelper pph(lexrc, titleTypeTags, TITLE_ENVIRONMENT);
|
||||
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown output type `$$Token'");
|
||||
return;
|
||||
case TITLE_COMMAND_AFTER:
|
||||
@ -503,7 +503,7 @@ void LyXTextClass::readTitleType(LyXLex & lexrc)
|
||||
}
|
||||
|
||||
|
||||
void LyXTextClass::readOutputType(LyXLex & lexrc)
|
||||
void LyXTextClass::readOutputType(Lexer & lexrc)
|
||||
{
|
||||
keyword_item outputTypeTags[] = {
|
||||
{ "docbook", DOCBOOK },
|
||||
@ -511,11 +511,11 @@ void LyXTextClass::readOutputType(LyXLex & lexrc)
|
||||
{ "literate", LITERATE }
|
||||
};
|
||||
|
||||
pushpophelper pph(lexrc, outputTypeTags, LITERATE);
|
||||
PushPopHelper pph(lexrc, outputTypeTags, LITERATE);
|
||||
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown output type `$$Token'");
|
||||
return;
|
||||
case LATEX:
|
||||
@ -541,7 +541,7 @@ enum ClassOptionsTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXTextClass::readClassOptions(LyXLex & lexrc)
|
||||
void LyXTextClass::readClassOptions(Lexer & lexrc)
|
||||
{
|
||||
keyword_item classOptionsTags[] = {
|
||||
{"end", CO_END },
|
||||
@ -556,7 +556,7 @@ void LyXTextClass::readClassOptions(LyXLex & lexrc)
|
||||
while (!getout && lexrc.isOK()) {
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown ClassOption tag `$$Token'");
|
||||
continue;
|
||||
default: break;
|
||||
@ -597,7 +597,7 @@ enum CharStyleTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXTextClass::readCharStyle(LyXLex & lexrc, string const & name)
|
||||
void LyXTextClass::readCharStyle(Lexer & lexrc, string const & name)
|
||||
{
|
||||
keyword_item elementTags[] = {
|
||||
{ "end", CS_END },
|
||||
@ -622,7 +622,7 @@ void LyXTextClass::readCharStyle(LyXLex & lexrc, string const & name)
|
||||
while (!getout && lexrc.isOK()) {
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown ClassOption tag `$$Token'");
|
||||
continue;
|
||||
default: break;
|
||||
@ -687,7 +687,7 @@ enum FloatTags {
|
||||
};
|
||||
|
||||
|
||||
void LyXTextClass::readFloat(LyXLex & lexrc)
|
||||
void LyXTextClass::readFloat(Lexer & lexrc)
|
||||
{
|
||||
keyword_item floatTags[] = {
|
||||
{ "end", FT_END },
|
||||
@ -716,7 +716,7 @@ void LyXTextClass::readFloat(LyXLex & lexrc)
|
||||
while (!getout && lexrc.isOK()) {
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown ClassOption tag `$$Token'");
|
||||
continue;
|
||||
default: break;
|
||||
@ -781,7 +781,7 @@ enum CounterTags {
|
||||
CT_END
|
||||
};
|
||||
|
||||
void LyXTextClass::readCounter(LyXLex & lexrc)
|
||||
void LyXTextClass::readCounter(Lexer & lexrc)
|
||||
{
|
||||
keyword_item counterTags[] = {
|
||||
{ "end", CT_END },
|
||||
@ -798,7 +798,7 @@ void LyXTextClass::readCounter(LyXLex & lexrc)
|
||||
while (!getout && lexrc.isOK()) {
|
||||
int le = lexrc.lex();
|
||||
switch (le) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown ClassOption tag `$$Token'");
|
||||
continue;
|
||||
default: break;
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
|
||||
namespace support { class FileName; }
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class Counters;
|
||||
class FloatList;
|
||||
|
||||
@ -69,19 +69,19 @@ public:
|
||||
/// Performs the read of the layout file.
|
||||
bool read(support::FileName const & filename, bool merge = false);
|
||||
///
|
||||
void readOutputType(LyXLex &);
|
||||
void readOutputType(Lexer &);
|
||||
///
|
||||
void readTitleType(LyXLex &);
|
||||
void readTitleType(Lexer &);
|
||||
///
|
||||
void readMaxCounter(LyXLex &);
|
||||
void readMaxCounter(Lexer &);
|
||||
///
|
||||
void readClassOptions(LyXLex &);
|
||||
void readClassOptions(Lexer &);
|
||||
///
|
||||
void readCharStyle(LyXLex &, std::string const &);
|
||||
void readCharStyle(Lexer &, std::string const &);
|
||||
///
|
||||
void readFloat(LyXLex &);
|
||||
void readFloat(Lexer &);
|
||||
///
|
||||
void readCounter(LyXLex &);
|
||||
void readCounter(Lexer &);
|
||||
///
|
||||
bool hasLayout(std::string const & name) const;
|
||||
|
||||
@ -174,7 +174,7 @@ private:
|
||||
///
|
||||
bool delete_layout(std::string const &);
|
||||
///
|
||||
bool do_readStyle(LyXLex &, LyXLayout &);
|
||||
bool do_readStyle(Lexer &, LyXLayout &);
|
||||
/// Layout file name
|
||||
std::string name_;
|
||||
/// document class name
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "LyXTextClassList.h"
|
||||
#include "LyXTextClass.h"
|
||||
#include "debug.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
|
||||
@ -96,7 +96,7 @@ public:
|
||||
// Reads LyX textclass definitions according to textclass config file
|
||||
bool LyXTextClassList::read()
|
||||
{
|
||||
LyXLex lex(0, 0);
|
||||
Lexer lex(0, 0);
|
||||
support::FileName const real_file = libFileSearch("", "textclass.lst");
|
||||
LYXERR(Debug::TCLASS) << "Reading textclasses from `"
|
||||
<< real_file << '\'' << endl;
|
||||
@ -135,7 +135,7 @@ bool LyXTextClassList::read()
|
||||
while (lex.isOK() && !finished) {
|
||||
LYXERR(Debug::TCLASS) << "\tline by line" << endl;
|
||||
switch (lex.lex()) {
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
finished = true;
|
||||
break;
|
||||
default:
|
||||
|
@ -181,6 +181,8 @@ lyx_SOURCES = \
|
||||
layout.h \
|
||||
lengthcommon.cpp \
|
||||
lengthcommon.h \
|
||||
Lexer.cpp \
|
||||
Lexer.h \
|
||||
lfuns.h \
|
||||
lyx_cb.cpp \
|
||||
lyx_cb.h \
|
||||
@ -201,8 +203,6 @@ lyx_SOURCES = \
|
||||
lyxlayout_ptr_fwd.h \
|
||||
LyXLength.cpp \
|
||||
LyXLength.h \
|
||||
LyXLex.cpp \
|
||||
LyXLex.h \
|
||||
LyXRC.cpp \
|
||||
LyXRC.h \
|
||||
Row.cpp \
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "LyXAction.h"
|
||||
#include "LyX.h" // for lastfiles
|
||||
#include "LyXFunc.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Paragraph.h"
|
||||
#include "TocBackend.h"
|
||||
#include "ToolbarBackend.h"
|
||||
@ -210,7 +210,7 @@ Menu & Menu::addWithStatusCheck(MenuItem const & i)
|
||||
}
|
||||
|
||||
|
||||
Menu & Menu::read(LyXLex & lex)
|
||||
Menu & Menu::read(Lexer & lex)
|
||||
{
|
||||
enum Menutags {
|
||||
md_item = 1,
|
||||
@ -904,7 +904,7 @@ void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
|
||||
}
|
||||
|
||||
|
||||
void MenuBackend::read(LyXLex & lex)
|
||||
void MenuBackend::read(Lexer & lex)
|
||||
{
|
||||
enum Menutags {
|
||||
md_menu = 1,
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class Buffer;
|
||||
class Menu;
|
||||
|
||||
@ -161,7 +161,7 @@ public:
|
||||
/// menu item.
|
||||
Menu & addWithStatusCheck(MenuItem const &);
|
||||
///
|
||||
Menu & read(LyXLex &);
|
||||
Menu & read(Lexer &);
|
||||
///
|
||||
docstring const & name() const { return name_; }
|
||||
///
|
||||
@ -207,7 +207,7 @@ public:
|
||||
///
|
||||
MenuBackend() {}
|
||||
///
|
||||
void read(LyXLex &);
|
||||
void read(Lexer &);
|
||||
///
|
||||
void add(Menu const &);
|
||||
///
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "Buffer.h"
|
||||
#include "gettext.h"
|
||||
#include "LyXLayout.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "Paragraph.h"
|
||||
#include "tex-strings.h"
|
||||
@ -176,7 +176,7 @@ void ParagraphParameters::leftIndent(LyXLength const & li)
|
||||
}
|
||||
|
||||
|
||||
void ParagraphParameters::read(LyXLex & lex)
|
||||
void ParagraphParameters::read(Lexer & lex)
|
||||
{
|
||||
while (lex.isOK()) {
|
||||
lex.nextToken();
|
||||
|
@ -29,7 +29,7 @@ namespace lyx {
|
||||
|
||||
class BufferView;
|
||||
class LyXLength;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class Paragraph;
|
||||
class Spacing;
|
||||
|
||||
@ -81,7 +81,7 @@ public:
|
||||
void leftIndent(LyXLength const &);
|
||||
|
||||
/// read the parameters from a lex
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
|
||||
/// write out the parameters to a stream
|
||||
void write(std::ostream & os) const;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "ToolbarBackend.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LyXAction.h"
|
||||
@ -79,7 +79,7 @@ void ToolbarInfo::add(ToolbarItem const & item)
|
||||
}
|
||||
|
||||
|
||||
ToolbarInfo & ToolbarInfo::read(LyXLex & lex)
|
||||
ToolbarInfo & ToolbarInfo::read(Lexer & lex)
|
||||
{
|
||||
enum tooltags {
|
||||
TO_COMMAND = 1,
|
||||
@ -208,7 +208,7 @@ ToolbarBackend::ToolbarBackend()
|
||||
}
|
||||
|
||||
|
||||
void ToolbarBackend::readToolbars(LyXLex & lex)
|
||||
void ToolbarBackend::readToolbars(Lexer & lex)
|
||||
{
|
||||
enum tooltags {
|
||||
TO_TOOLBAR = 1,
|
||||
@ -255,7 +255,7 @@ void ToolbarBackend::readToolbars(LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void ToolbarBackend::readToolbarSettings(LyXLex & lex)
|
||||
void ToolbarBackend::readToolbarSettings(Lexer & lex)
|
||||
{
|
||||
//consistency check
|
||||
if (compare_ascii_no_case(lex.getString(), "toolbars")) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace lyx {
|
||||
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
class ToolbarItem {
|
||||
public:
|
||||
@ -97,7 +97,7 @@ public:
|
||||
Flags flags;
|
||||
|
||||
/// read a toolbar from the file
|
||||
ToolbarInfo & read(LyXLex &);
|
||||
ToolbarInfo & read(Lexer &);
|
||||
|
||||
private:
|
||||
/// add toolbar item
|
||||
@ -122,10 +122,10 @@ public:
|
||||
Toolbars::iterator end() { return usedtoolbars.end(); }
|
||||
|
||||
/// read toolbars from the file
|
||||
void readToolbars(LyXLex &);
|
||||
void readToolbars(Lexer &);
|
||||
|
||||
/// read ui toolbar settings
|
||||
void readToolbarSettings(LyXLex &);
|
||||
void readToolbarSettings(Lexer &);
|
||||
///
|
||||
ToolbarInfo const & getToolbar(std::string const & name) const;
|
||||
///
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "Trans.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "debug.h"
|
||||
#include "TransState.h"
|
||||
|
||||
@ -126,7 +126,7 @@ void Trans::addDeadkey(tex_accent accent, docstring const & keys)
|
||||
}
|
||||
|
||||
|
||||
int Trans::load(LyXLex & lex)
|
||||
int Trans::load(Lexer & lex)
|
||||
{
|
||||
bool error = false;
|
||||
|
||||
@ -281,7 +281,7 @@ int Trans::load(LyXLex & lex)
|
||||
key, str);
|
||||
break;
|
||||
}
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
LYXERR(Debug::PARSER) << "End of parsing" << endl;
|
||||
break;
|
||||
default:
|
||||
@ -328,7 +328,7 @@ int Trans::load(string const & language)
|
||||
return -1;
|
||||
|
||||
freeKeymap();
|
||||
LyXLex lex(kmapTags, K_LAST - 1);
|
||||
Lexer lex(kmapTags, K_LAST - 1);
|
||||
lex.setFile(filename);
|
||||
|
||||
int const res = load(lex);
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace lyx {
|
||||
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
class TransManager;
|
||||
|
||||
@ -53,7 +53,7 @@ private:
|
||||
///
|
||||
void freeKeymap();
|
||||
///
|
||||
int load(LyXLex &);
|
||||
int load(Lexer &);
|
||||
///
|
||||
docstring const & match(char_type c);
|
||||
///
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Row.h"
|
||||
#include "Paragraph.h"
|
||||
#include "ParagraphParameters.h"
|
||||
@ -84,7 +84,7 @@ bool font2string(LyXFont const & font, bool const toggle, string & data)
|
||||
bool string2font(string const & data, LyXFont & font, bool & toggle)
|
||||
{
|
||||
istringstream is(data);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(is);
|
||||
|
||||
int nset = 0;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "FloatList.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyX.h"
|
||||
#include "Paragraph.h"
|
||||
|
||||
@ -372,7 +372,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
|
||||
InsetBase * readInset(LyXLex & lex, Buffer const & buf)
|
||||
InsetBase * readInset(Lexer & lex, Buffer const & buf)
|
||||
{
|
||||
// consistency check
|
||||
if (lex.getString() != "\\begin_inset") {
|
||||
|
@ -18,14 +18,14 @@ class Buffer;
|
||||
class BufferView;
|
||||
class FuncRequest;
|
||||
class InsetBase;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
|
||||
/// creates inset according to 'cmd'
|
||||
InsetBase * createInset(BufferView * bv, FuncRequest const & cmd);
|
||||
|
||||
/// read inset from a file
|
||||
InsetBase * readInset(LyXLex & lex, Buffer const & buf);
|
||||
InsetBase * readInset(Lexer & lex, Buffer const & buf);
|
||||
|
||||
|
||||
} // namespace lyx
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ControlLog.h"
|
||||
|
||||
#include "gettext.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
@ -38,7 +38,7 @@ ControlLog::ControlLog(Dialog & parent)
|
||||
bool ControlLog::initialiseParams(string const & data)
|
||||
{
|
||||
istringstream is(data);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(is);
|
||||
|
||||
string logtype, logfile;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ControlParagraph.h"
|
||||
#include "ButtonController.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Paragraph.h"
|
||||
#include "ParagraphParameters.h"
|
||||
|
||||
@ -35,7 +35,7 @@ ControlParagraph::ControlParagraph(Dialog & parent)
|
||||
bool ControlParagraph::initialiseParams(string const & data)
|
||||
{
|
||||
istringstream is(data);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(is);
|
||||
|
||||
// Set tri-state flag:
|
||||
|
@ -3003,7 +3003,7 @@
|
||||
|
||||
* insetbibtex.[Ch] (clone): move out of line; use copy c-tor.
|
||||
|
||||
* insetexternal.C (read): use pushpophelper.
|
||||
* insetexternal.C (read): use PushPopHelper.
|
||||
|
||||
2003-07-28 José Matos <jamatos@lyx.org>
|
||||
|
||||
@ -3419,7 +3419,7 @@
|
||||
* insetexternal.h: remove Params::parameters variable.
|
||||
|
||||
* insetexternal.C (read, write): rewrite to output new ExternalInset
|
||||
format and read it back making full use of LyXLex.
|
||||
format and read it back making full use of Lexer.
|
||||
|
||||
2003-06-04 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ExternalTemplate.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
@ -251,7 +251,7 @@ void TemplateManager::readTemplates(support::FileName const & path)
|
||||
{ "templateend", TM_TEMPLATE_END }
|
||||
};
|
||||
|
||||
LyXLex lex(templatetags, TM_TEMPLATE_END);
|
||||
Lexer lex(templatetags, TM_TEMPLATE_END);
|
||||
|
||||
support::FileName const filename = support::libFileSearch("", "external_templates");
|
||||
if (filename.empty() || !lex.setFile(filename)) {
|
||||
@ -310,7 +310,7 @@ void add(vector<TransformID> & ids, string const & name)
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void Template::readTemplate(LyXLex & lex)
|
||||
void Template::readTemplate(Lexer & lex)
|
||||
{
|
||||
enum TemplateOptionTags {
|
||||
TO_GUINAME = 1,
|
||||
@ -334,7 +334,7 @@ void Template::readTemplate(LyXLex & lex)
|
||||
{ "transform", TO_TRANSFORM }
|
||||
};
|
||||
|
||||
pushpophelper pph(lex, templateoptiontags, TO_END);
|
||||
PushPopHelper pph(lex, templateoptiontags, TO_END);
|
||||
|
||||
while (lex.isOK()) {
|
||||
switch (lex.lex()) {
|
||||
@ -466,7 +466,7 @@ void setOptionFactory(Template::Format & format, string const & transform,
|
||||
} // namespace anon
|
||||
|
||||
|
||||
void Template::Format::readFormat(LyXLex & lex)
|
||||
void Template::Format::readFormat(Lexer & lex)
|
||||
{
|
||||
enum FormatTags {
|
||||
FO_PRODUCT = 1,
|
||||
@ -494,7 +494,7 @@ void Template::Format::readFormat(LyXLex & lex)
|
||||
{ "updateresult", FO_UPDATERESULT }
|
||||
};
|
||||
|
||||
pushpophelper pph(lex, formattags, FO_END);
|
||||
PushPopHelper pph(lex, formattags, FO_END);
|
||||
|
||||
while (lex.isOK()) {
|
||||
switch (lex.lex()) {
|
||||
|
@ -21,7 +21,7 @@ namespace lyx {
|
||||
|
||||
namespace support { class FileName; }
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
namespace external {
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
/// We have to have default commands for safety reasons!
|
||||
Template();
|
||||
///
|
||||
void readTemplate(LyXLex &);
|
||||
void readTemplate(Lexer &);
|
||||
///
|
||||
void dumpFormats(std::ostream &) const;
|
||||
|
||||
@ -64,7 +64,7 @@ public:
|
||||
public:
|
||||
Format();
|
||||
///
|
||||
void readFormat(LyXLex &);
|
||||
void readFormat(Lexer &);
|
||||
|
||||
/// The text that should be inserted into the exported file
|
||||
std::string product;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
namespace external {
|
||||
|
||||
|
@ -33,7 +33,7 @@ class InsetText;
|
||||
class LaTeXFeatures;
|
||||
class LColor_color;
|
||||
class LCursor;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class LyXText;
|
||||
class MetricsInfo;
|
||||
class Dimension;
|
||||
@ -383,7 +383,7 @@ public:
|
||||
/// write inset in .lyx format
|
||||
virtual void write(Buffer const &, std::ostream &) const {}
|
||||
/// read inset in .lyx format
|
||||
virtual void read(Buffer const &, LyXLex &) {}
|
||||
virtual void read(Buffer const &, Lexer &) {}
|
||||
/** Export the inset to LaTeX.
|
||||
* Don't use a temporary stringstream if the final output is
|
||||
* supposed to go to a file.
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "DispatchResult.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LyXFont.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Paragraph.h"
|
||||
#include "ParagraphList.h"
|
||||
|
||||
@ -84,7 +84,7 @@ void InsetBibitem::setCounter(int c)
|
||||
}
|
||||
|
||||
|
||||
void InsetBibitem::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetBibitem::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
InsetCommand::read(buf, lex);
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
///
|
||||
InsetBibitem(InsetCommandParams const &);
|
||||
///
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
///
|
||||
docstring const getScreenLabel(Buffer const &) const;
|
||||
///
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Paragraph.h"
|
||||
#include "TextMetrics.h"
|
||||
@ -134,7 +134,7 @@ void InsetBox::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetBox::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetBox::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
InsetCollapsable::read(buf, lex);
|
||||
@ -485,7 +485,7 @@ void InsetBoxMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
@ -533,7 +533,7 @@ void InsetBoxParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetBoxParams::read(LyXLex & lex)
|
||||
void InsetBoxParams::read(Lexer & lex)
|
||||
{
|
||||
if (!lex.isOK())
|
||||
return;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
///
|
||||
std::string type;
|
||||
/// Use a parbox (true) or minipage (false)
|
||||
@ -68,7 +68,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void setButtonLabel();
|
||||
///
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "Paragraph.h"
|
||||
#include "OutputParams.h"
|
||||
|
||||
@ -84,7 +84,7 @@ void InsetBranch::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetBranch::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetBranch::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
InsetCollapsable::read(buf, lex);
|
||||
@ -296,7 +296,7 @@ void InsetBranchMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
@ -321,7 +321,7 @@ void InsetBranchParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetBranchParams::read(LyXLex & lex)
|
||||
void InsetBranchParams::read(Lexer & lex)
|
||||
{
|
||||
lex >> branch;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
///
|
||||
docstring branch;
|
||||
};
|
||||
@ -49,7 +49,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void setButtonLabel();
|
||||
///
|
||||
|
@ -67,7 +67,7 @@ void InsetCaption::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetCaption::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetCaption::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
#if 0
|
||||
// We will enably this check again when the compability
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
virtual bool display() const;
|
||||
///
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Paragraph.h"
|
||||
@ -131,7 +131,7 @@ void InsetCharStyle::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetCharStyle::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetCharStyle::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
InsetCollapsable::read(buf, lex);
|
||||
@ -353,7 +353,7 @@ void InsetCharStyleParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetCharStyleParams::read(LyXLex & lex)
|
||||
void InsetCharStyleParams::read(Lexer & lex)
|
||||
{
|
||||
while (lex.isOK()) {
|
||||
lex.next();
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
///
|
||||
std::string type;
|
||||
///
|
||||
@ -66,7 +66,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
bool metrics(MetricsInfo &, Dimension &) const;
|
||||
///
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Paragraph.h"
|
||||
@ -99,7 +99,7 @@ void InsetCollapsable::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetCollapsable::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetCollapsable::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
bool token_found = false;
|
||||
if (lex.isOK()) {
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
///
|
||||
InsetCollapsable(InsetCollapsable const & rhs);
|
||||
///
|
||||
void read(Buffer const &, LyXLex &);
|
||||
void read(Buffer const &, Lexer &);
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
|
||||
#include <sstream>
|
||||
@ -193,7 +193,7 @@ void InsetCommandMailer::string2params(string const & name,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string n;
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
void write(Buffer const &, std::ostream & os) const
|
||||
{ p_.write(os); }
|
||||
///
|
||||
virtual void read(Buffer const &, LyXLex & lex)
|
||||
virtual void read(Buffer const &, Lexer & lex)
|
||||
{ p_.read(lex); }
|
||||
///
|
||||
int latex(Buffer const &, odocstream &, OutputParams const &) const;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include "support/ExceptionMessage.h"
|
||||
#include "support/lstrings.h"
|
||||
@ -256,7 +256,7 @@ void InsetCommandParams::scanCommand(string const & cmd)
|
||||
}
|
||||
|
||||
|
||||
void InsetCommandParams::read(LyXLex & lex)
|
||||
void InsetCommandParams::read(Lexer & lex)
|
||||
{
|
||||
if (lex.isOK()) {
|
||||
lex.next();
|
||||
@ -310,7 +310,7 @@ void InsetCommandParams::write(ostream & os) const
|
||||
if (!params_[i].empty())
|
||||
// FIXME UNICODE
|
||||
os << info_->paramnames[i] << ' '
|
||||
<< LyXLex::quoteString(to_utf8(params_[i]))
|
||||
<< Lexer::quoteString(to_utf8(params_[i]))
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
|
@ -21,14 +21,14 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
class InsetCommandParams {
|
||||
public:
|
||||
/// Construct parameters for command \p name. \p name must be known.
|
||||
explicit InsetCommandParams(std::string const & name);
|
||||
///
|
||||
void read(LyXLex &);
|
||||
void read(Lexer &);
|
||||
/// Parse the command
|
||||
/// FIXME remove
|
||||
void scanCommand(std::string const &);
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXAction.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXTextClass.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "ParagraphParameters.h"
|
||||
@ -114,7 +114,7 @@ void InsetERT::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetERT::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetERT::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
InsetCollapsable::read(buf, lex);
|
||||
|
||||
@ -456,7 +456,7 @@ void InsetERTMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
virtual docstring const editMessage() const;
|
||||
///
|
||||
|
@ -55,7 +55,7 @@ void InsetEnvironment::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetEnvironment::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
InsetText::read(buf, lex);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
InsetBase::Code lyxCode() const { return InsetBase::ENVIRONMENT_CODE; }
|
||||
///
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyX.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -239,7 +239,7 @@ void InsetExternalParams::write(Buffer const & buffer, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
bool InsetExternalParams::read(Buffer const & buffer, LyXLex & lex)
|
||||
bool InsetExternalParams::read(Buffer const & buffer, Lexer & lex)
|
||||
{
|
||||
enum ExternalTags {
|
||||
EX_TEMPLATE = 1,
|
||||
@ -277,7 +277,7 @@ bool InsetExternalParams::read(Buffer const & buffer, LyXLex & lex)
|
||||
{ "width", EX_WIDTH }
|
||||
};
|
||||
|
||||
pushpophelper pph(lex, external_tags, EX_END);
|
||||
PushPopHelper pph(lex, external_tags, EX_END);
|
||||
|
||||
bool found_end = false;
|
||||
bool read_error = false;
|
||||
@ -665,7 +665,7 @@ void InsetExternal::write(Buffer const & buffer, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetExternal::read(Buffer const & buffer, LyXLex & lex)
|
||||
void InsetExternal::read(Buffer const & buffer, Lexer & lex)
|
||||
{
|
||||
InsetExternalParams params;
|
||||
if (params.read(buffer, lex))
|
||||
@ -868,7 +868,7 @@ void InsetExternalMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
InsetExternalParams();
|
||||
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
bool read(Buffer const &, LyXLex &);
|
||||
bool read(Buffer const &, Lexer &);
|
||||
|
||||
/// The name of the tempfile used for manipulations.
|
||||
support::FileName const & tempname() const { return tempname_(); }
|
||||
@ -122,7 +122,7 @@ public:
|
||||
///
|
||||
virtual void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
virtual void read(Buffer const &, LyXLex & lex);
|
||||
virtual void read(Buffer const &, Lexer & lex);
|
||||
|
||||
/// \returns the number of rows (\n's) of generated code.
|
||||
int latex(Buffer const &, odocstream &,
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
#include "TocBackend.h"
|
||||
@ -206,7 +206,7 @@ void InsetFloatParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFloatParams::read(LyXLex & lex)
|
||||
void InsetFloatParams::read(Lexer & lex)
|
||||
{
|
||||
string token;
|
||||
lex >> token;
|
||||
@ -244,7 +244,7 @@ void InsetFloat::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFloat::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetFloat::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
wide(params_.wide, buf.params());
|
||||
@ -433,7 +433,7 @@ void InsetFloatMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
///
|
||||
std::string type;
|
||||
///
|
||||
@ -51,7 +51,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "TocBackend.h"
|
||||
|
||||
@ -72,7 +72,7 @@ void InsetFloatList::write(Buffer const &, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetFloatList::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetFloatList::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
FloatList const & floats = buf.params().getLyXTextClass().floats();
|
||||
string token;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex &);
|
||||
void read(Buffer const &, Lexer &);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
|
@ -65,7 +65,7 @@ TODO
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXLength.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Mover.h"
|
||||
#include "OutputParams.h"
|
||||
@ -262,7 +262,7 @@ void InsetGraphics::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphics::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetGraphics::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
string const token = lex.getString();
|
||||
|
||||
@ -275,7 +275,7 @@ void InsetGraphics::read(Buffer const & buf, LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphics::readInsetGraphics(LyXLex & lex, string const & bufpath)
|
||||
void InsetGraphics::readInsetGraphics(Lexer & lex, string const & bufpath)
|
||||
{
|
||||
bool finished = false;
|
||||
|
||||
@ -965,7 +965,7 @@ void InsetGraphicsMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
|
||||
/** returns the number of rows (\n's) of generated tex code.
|
||||
#fragile == true# means, that the inset should take care about
|
||||
@ -89,7 +89,7 @@ private:
|
||||
virtual std::auto_ptr<InsetBase> doClone() const;
|
||||
|
||||
/// Read the inset native format
|
||||
void readInsetGraphics(LyXLex & lex, std::string const & bufpath);
|
||||
void readInsetGraphics(Lexer & lex, std::string const & bufpath);
|
||||
|
||||
/// Get the status message, depends on the image loading status.
|
||||
std::string const statusMessage() const;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "LyX.h" // for use_gui
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
#include "graphics/GraphicsParams.h"
|
||||
@ -192,7 +192,7 @@ void InsetGraphicsParams::Write(ostream & os, string const & bufpath) const
|
||||
}
|
||||
|
||||
|
||||
bool InsetGraphicsParams::Read(LyXLex & lex, string const & token, string const & bufpath)
|
||||
bool InsetGraphicsParams::Read(Lexer & lex, string const & token, string const & bufpath)
|
||||
{
|
||||
if (token == "filename") {
|
||||
lex.eatLine();
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
|
||||
namespace graphics { class Params; }
|
||||
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
|
||||
|
||||
/// This class holds all the parameters needed by insetGraphics.
|
||||
@ -73,7 +73,7 @@ public:
|
||||
/// Save the parameters in the LyX format stream.
|
||||
void Write(std::ostream & os, std::string const & bufpath) const;
|
||||
/// If the token belongs to our parameters, read it.
|
||||
bool Read(LyXLex & lex, std::string const & token, std::string const & bufpath);
|
||||
bool Read(Lexer & lex, std::string const & token, std::string const & bufpath);
|
||||
/// convert
|
||||
// Only a subset of InsetGraphicsParams is needed for display purposes.
|
||||
// This function also interrogates lyxrc to ascertain whether
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyX.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
#include "TocBackend.h"
|
||||
@ -262,13 +262,13 @@ void InsetInclude::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetInclude::read(Buffer const &, LyXLex & lex)
|
||||
void InsetInclude::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
read(lex);
|
||||
}
|
||||
|
||||
|
||||
void InsetInclude::read(LyXLex & lex)
|
||||
void InsetInclude::read(Lexer & lex)
|
||||
{
|
||||
if (lex.isOK()) {
|
||||
lex.eatLine();
|
||||
@ -826,7 +826,7 @@ void InsetIncludeMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex &);
|
||||
void read(Buffer const &, Lexer &);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
@ -120,7 +120,7 @@ private:
|
||||
///
|
||||
void write(std::ostream &) const;
|
||||
///
|
||||
void read(LyXLex &);
|
||||
void read(Lexer &);
|
||||
|
||||
/// the parameters
|
||||
InsetCommandParams params_;
|
||||
|
@ -30,7 +30,7 @@ using std::endl;
|
||||
using std::ostream;
|
||||
|
||||
|
||||
void InsetLine::read(Buffer const &, LyXLex &)
|
||||
void InsetLine::read(Buffer const &, Lexer &)
|
||||
{
|
||||
/* Nothing to read */
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
int docbook(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
/// We don't need \begin_inset and \end_inset
|
||||
|
@ -30,7 +30,7 @@ using std::endl;
|
||||
using std::ostream;
|
||||
|
||||
|
||||
void InsetNewline::read(Buffer const &, LyXLex &)
|
||||
void InsetNewline::read(Buffer const &, Lexer &)
|
||||
{
|
||||
/* Nothing to read */
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
|
||||
int docbook(Buffer const &, odocstream &, OutputParams const &) const;
|
||||
|
||||
virtual void read(Buffer const &, LyXLex & lex);
|
||||
virtual void read(Buffer const &, Lexer & lex);
|
||||
|
||||
virtual void write(Buffer const & buf, std::ostream & os) const;
|
||||
/// We don't need \begin_inset and \end_inset
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
@ -101,7 +101,7 @@ void InsetNoteParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetNoteParams::read(LyXLex & lex)
|
||||
void InsetNoteParams::read(Lexer & lex)
|
||||
{
|
||||
string label;
|
||||
lex >> label;
|
||||
@ -157,7 +157,7 @@ void InsetNote::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetNote::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetNote::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
InsetCollapsable::read(buf, lex);
|
||||
@ -391,7 +391,7 @@ void InsetNoteMailer::string2params(string const & in,
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
///
|
||||
void read(LyXLex & lex);
|
||||
void read(Lexer & lex);
|
||||
///
|
||||
Type type;
|
||||
};
|
||||
@ -54,7 +54,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void setButtonLabel();
|
||||
/// show the note dialog
|
||||
|
@ -32,7 +32,7 @@ using std::endl;
|
||||
using std::ostream;
|
||||
|
||||
|
||||
void InsetPagebreak::read(Buffer const &, LyXLex &)
|
||||
void InsetPagebreak::read(Buffer const &, Lexer &)
|
||||
{
|
||||
/* Nothing to read */
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
int docbook(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
|
||||
virtual void write(Buffer const & buf, std::ostream & os) const;
|
||||
/// We don't need \begin_inset and \end_inset
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "debug.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -284,7 +284,7 @@ void InsetQuotes::write(Buffer const &, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetQuotes::read(Buffer const &, LyXLex & lex)
|
||||
void InsetQuotes::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
lex.next();
|
||||
parseString(lex.getString());
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &, OutputParams const &) const;
|
||||
///
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
|
||||
@ -140,7 +140,7 @@ void InsetSpace::write(Buffer const &, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetSpace::read(Buffer const &, LyXLex & lex)
|
||||
void InsetSpace::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
lex.next();
|
||||
string const command = lex.getString();
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
/// Will not be used when lyxf3
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "debug.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
@ -147,7 +147,7 @@ void InsetSpecialChar::write(Buffer const &, ostream & os) const
|
||||
|
||||
|
||||
// This function will not be necessary when lyx3
|
||||
void InsetSpecialChar::read(Buffer const &, LyXLex & lex)
|
||||
void InsetSpecialChar::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
lex.next();
|
||||
string const command = lex.getString();
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
/// Will not be used when lyxf3
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
///
|
||||
int latex(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
@ -220,7 +220,7 @@ void InsetTabular::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetTabular::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetTabular::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
bool const old_format = (lex.getString() == "\\LyXTable");
|
||||
|
||||
@ -2112,7 +2112,7 @@ string const InsetTabularMailer::inset2string(Buffer const &) const
|
||||
void InsetTabularMailer::string2params(string const & in, InsetTabular & inset)
|
||||
{
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
if (in.empty())
|
||||
|
@ -39,7 +39,7 @@
|
||||
namespace lyx {
|
||||
|
||||
class FuncStatus;
|
||||
class LyXLex;
|
||||
class Lexer;
|
||||
class BufferView;
|
||||
class Buffer;
|
||||
class BufferParams;
|
||||
@ -56,7 +56,7 @@ public:
|
||||
///
|
||||
~InsetTabular();
|
||||
///
|
||||
void read(Buffer const &, LyXLex &);
|
||||
void read(Buffer const &, Lexer &);
|
||||
///
|
||||
void write(Buffer const &, std::ostream &) const;
|
||||
///
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "Intl.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxfind.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -141,7 +141,7 @@ void InsetText::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetText::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetText::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
clear();
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/// empty inset to empty par
|
||||
void clear();
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -83,7 +83,7 @@ void InsetVSpace::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
|
||||
void InsetVSpace::read(Buffer const &, LyXLex & lex)
|
||||
void InsetVSpace::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
BOOST_ASSERT(lex.isOK());
|
||||
string vsp;
|
||||
@ -247,7 +247,7 @@ void InsetVSpaceMailer::string2params(string const & in, VSpace & vspace)
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
int docbook(Buffer const &, odocstream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
void read(Buffer const &, LyXLex & lex);
|
||||
void read(Buffer const &, Lexer & lex);
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
#include "TocBackend.h"
|
||||
@ -121,7 +121,7 @@ void InsetWrapParams::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetWrapParams::read(LyXLex & lex)
|
||||
void InsetWrapParams::read(Lexer & lex)
|
||||
{
|
||||
string token;
|
||||
lex >> token;
|
||||
@ -153,7 +153,7 @@ void InsetWrap::write(Buffer const & buf, ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
void InsetWrap::read(Buffer const & buf, LyXLex & lex)
|
||||
void InsetWrap::read(Buffer const & buf, Lexer & lex)
|
||||
{
|
||||
params_.read(lex);
|
||||
InsetCollapsable::read(buf, lex);
|
||||
@ -262,7 +262,7 @@ void InsetWrapMailer::string2params(string const & in, InsetWrapParams & params)
|
||||
return;
|
||||
|
||||
istringstream data(in);
|
||||
LyXLex lex(0,0);
|
||||
Lexer lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
string name;
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
///
|
||||
void write(std::ostream &) const;
|
||||
///
|
||||
void read(LyXLex &);
|
||||
void read(Lexer &);
|
||||
|
||||
///
|
||||
std::string type;
|
||||
@ -47,7 +47,7 @@ public:
|
||||
///
|
||||
void write(Buffer const & buf, std::ostream & os) const;
|
||||
///
|
||||
void read(Buffer const & buf, LyXLex & lex);
|
||||
void read(Buffer const & buf, Lexer & lex);
|
||||
///
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "debug.h"
|
||||
#include "kb_sequence.h"
|
||||
#include "LyXAction.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
|
||||
#include "frontends/LyXKeySym.h"
|
||||
|
||||
@ -95,7 +95,7 @@ bool kb_keymap::read(string const & bind_file)
|
||||
{
|
||||
const int bindCount = sizeof(bindTags) / sizeof(keyword_item);
|
||||
|
||||
LyXLex lexrc(bindTags, bindCount);
|
||||
Lexer lexrc(bindTags, bindCount);
|
||||
if (lyxerr.debugging(Debug::PARSER))
|
||||
lexrc.printTable(lyxerr);
|
||||
|
||||
@ -112,11 +112,11 @@ bool kb_keymap::read(string const & bind_file)
|
||||
bool error = false;
|
||||
while (lexrc.isOK()) {
|
||||
switch (lexrc.lex()) {
|
||||
case LyXLex::LEX_UNDEF:
|
||||
case Lexer::LEX_UNDEF:
|
||||
lexrc.printError("Unknown tag `$$Token'");
|
||||
error = true;
|
||||
continue;
|
||||
case LyXLex::LEX_FEOF:
|
||||
case Lexer::LEX_FEOF:
|
||||
continue;
|
||||
case BN_BIND:
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "LyXLex.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
@ -108,7 +108,7 @@ int InsetFormulaMacro::docbook(Buffer const & buf, ostream & os,
|
||||
}
|
||||
|
||||
|
||||
void InsetFormulaMacro::read(Buffer const &, LyXLex & lex)
|
||||
void InsetFormulaMacro::read(Buffer const &, Lexer & lex)
|
||||
{
|
||||
read(lex.getStream());
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user