lexer: when switching to another output stream, clean last read character.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Mon, 25 Aug 2008 13:49:58 +0000 (17:49 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Tue, 9 Sep 2008 08:32:49 +0000 (12:32 +0400)
Otherwise we prepend to the current stream the last character read from
the previous stream, which is obviously incorrect.

ginac/parser/lexer.cpp

index ed1f894..894a2ad 100644 (file)
@@ -126,6 +126,7 @@ void lexer::switch_input(std::istream* in)
        input = in;
        line_num = 0;
        column = 0;
+       c = ' ';
 }
 
 } // namespace GiNaC