]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex.C
Angus insetindex patch + protect patch from Dekel
[lyx.git] / src / lyxlex.C
index 6fe01651b427b9d89bf6fe14bbd205fbc9eab5ab..64273bf89b146c35c55a9143a07b553add34f64f 100644 (file)
@@ -1,8 +1,15 @@
-//  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>
 
@@ -123,7 +130,7 @@ float LyXLex::GetFloat() const
 }
 
 
-string const LyXLex::GetString() const
+string LyXLex::GetString() const
 {
        return pimpl_->GetString();
 }
@@ -167,7 +174,7 @@ string LyXLex::getLongString(string const & endtoken)
                            && prefixIs(tmpstr, prefix.c_str())) {
                                tmpstr.erase(0, prefix.length() - 1);
                        }
-                       str += tmpstr + '\n';
+                       str += frontStrip(tmpstr, "\t") + '\n';
                 }
                else // token == endtoken
                        break;
@@ -207,6 +214,12 @@ bool LyXLex::nextToken()
 }
 
 
+void LyXLex::pushToken(string const & pt)
+{
+       pimpl_->pushToken(pt);
+}
+
+
 int LyXLex::FindToken(char const * str[])
 {  
    int i = -1;