X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2FParser.cpp;h=ec63b77da83e7c063724746427fa64be8c0c127e;hb=fadb93ae687c5ce118ecfdad321dba2a564d6e5d;hp=69e3460f459de17c1ccc6f15b564eeac8589af69;hpb=9c55af4a223ce4db29d643251109e245665344bd;p=lyx.git diff --git a/src/tex2lyx/Parser.cpp b/src/tex2lyx/Parser.cpp index 69e3460f45..ec63b77da8 100644 --- a/src/tex2lyx/Parser.cpp +++ b/src/tex2lyx/Parser.cpp @@ -12,7 +12,6 @@ #include "Encoding.h" #include "Parser.h" -#include "support/foreach.h" #include "support/lstrings.h" #include "support/textutils.h" @@ -49,7 +48,7 @@ char_type getNewline(iparserdocstream & is, char_type c) return c; } -} +} // namespace // // Token @@ -162,6 +161,7 @@ Parser::Parser(idocstream & is, std::string const & fixedenc) { if (fixed_enc_) is_.setEncoding(fixedenc); + catInit(); } @@ -173,6 +173,7 @@ Parser::Parser(string const & s) // An idocstringstream can not change the encoding fixed_enc_(true) { + catInit(); } @@ -338,7 +339,7 @@ Token const Parser::get_token() if (pos_ >= tokens_.size()) return dummy; } - // cerr << "looking at token " << tokens_[pos_] + // cerr << "looking at token " << tokens_[pos_] // << " pos: " << pos_ << '\n'; return tokens_[pos_++]; } @@ -661,7 +662,7 @@ Parser::Arg Parser::verbatimStuff(string const & end_string, bool const allow_li return Arg(false, string()); } if (match_index) { - oss << end_string.substr(0, match_index) + oss << end_string.substr(0, match_index) << t.asInput(); match_index = 0; } else