]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_lexer.ll
- the ex stream >> operator is gone
[ginac.git] / ginsh / ginsh_lexer.ll
index 7f78a2dd3f97ec72cd0f0d4992c8047cff825f34..250403536b19094cfea4ca69ade10bb6913341fa 100644 (file)
@@ -101,9 +101,11 @@ score                      return T_SCORE;
 
                        /* symbols */
 {A}{AN}*               {
-                               if (syms.find(yytext) == syms.end())
-                                       syms[yytext] = *(new symbol(yytext));
-                               yylval = syms[yytext];
+                               sym_tab::const_iterator i = syms.find(yytext);
+                               if (i == syms.end()) {
+                                       yylval = syms[yytext] = *(new symbol(yytext));
+                               } else
+                                       yylval = i->second;
                                return T_SYMBOL;
                        }