-// Generalized simple lexical analizer.
-// It can be used for simple syntax parsers, like lyxrc,
-// texclass and others to come. [asierra30/03/96]
-//
-// Copyright 1996 Lyx Team.
+/* This file is part of
+ * ======================================================
+ *
+ * LyX, The Document Processor
+ *
+ * Copyright 1996-2000 The LyX Team.
+ *
+ * Generalized simple lexical analizer.
+ * It can be used for simple syntax parsers, like lyxrc,
+ * texclass and others to come. [asierra30/03/96]
+ *
+ * ====================================================== */
#include <config.h>
return pimpl_->lineno;
}
-char const * LyXLex::text() const
+
+char const * const LyXLex::text() const
{
return &pimpl_->buff[0];
}
// I would prefer to give a tag number instead of an explicit token
// here, but it is not possible because Buffer::readLyXformat2 uses
// explicit tokens (JMarc)
-string LyXLex::getLongString(string const & endtoken)
+string const LyXLex::getLongString(string const & endtoken)
{
string str, prefix;
bool firstline = true;
&& prefixIs(tmpstr, prefix.c_str())) {
tmpstr.erase(0, prefix.length() - 1);
}
- str += tmpstr + '\n';
+ str += frontStrip(tmpstr, "\t") + '\n';
}
else // token == endtoken
break;