]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_lexer.ll
check_parameter_G: fix pontential increment of end().
[ginac.git] / ginsh / ginsh_lexer.ll
index 817df6ec1d505cb39266c16a70dd9765468380dd..f44a95c10b95ae57b3908f6cbdc6d165b267ae51 100644 (file)
@@ -4,7 +4,7 @@
  *  This file must be processed with flex. */
 
 /*
- *  GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -113,9 +113,13 @@ real_symbols    return T_REAL_SYMBOLS;
                                sym_tab::const_iterator i = syms.find(yytext);
                                if (i == syms.end()) {
                                        if (symboltype == domain::complex) {
-                                               yylval = syms[yytext] = *(new symbol(yytext));
+                                               symbol tmp(yytext);
+                                               syms[yytext] = tmp;
+                                               yylval = tmp;
                                        } else {
-                                               yylval = syms[yytext] = *(new symbol(yytext, domain::real));
+                                               realsymbol tmp(yytext);
+                                               syms[yytext] = tmp;
+                                               yylval = tmp;
                                        }
                                } else
                                        yylval = i->second;