X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginsh%2Fginsh_lexer.ll;h=7ba013efa0e017897338070658b3649895987844;hb=073bf40a73e419a3dbcb6dfa190947ce2cc3bdce;hp=16e86e5b4c6c53dd0c3e7e9e1197679b20756dd3;hpb=695f6ae955ec530cded8f21efd5569df39447f76;p=ginac.git diff --git a/ginsh/ginsh_lexer.ll b/ginsh/ginsh_lexer.ll index 16e86e5b..7ba013ef 100644 --- a/ginsh/ginsh_lexer.ll +++ b/ginsh/ginsh_lexer.ll @@ -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-2011 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 @@ -18,7 +18,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -29,7 +29,9 @@ %pointer %{ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include "ginsh.h" #include "ginsh_parser.h" @@ -113,9 +115,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;