]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_lexer.ll
Added get_builtin_reader() that parses only the builtin GiNaC functions
[ginac.git] / ginsh / ginsh_lexer.ll
index e082b2ea77d6ed5a6f998a84d7e49315dde1ef0a..a2ab36bdfe7aa19662731447e43f77d4bfc238e9 100644 (file)
@@ -4,7 +4,7 @@
  *  This file must be processed with flex. */
 
 /*
- *  GiNaC Copyright (C) 1999-2005 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2010 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;