X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginsh%2Fginsh_lexer.ll;h=cdb4237be29839949b63be81a32981a5340e8001;hp=15185d66a56b85c86813959c29f01f0871f4ef94;hb=d625a28c3def007a9d2d5108141a6f6a4889bf9d;hpb=5b39fbbac3cb187af4c09146d11e7cc602be666b diff --git a/ginsh/ginsh_lexer.ll b/ginsh/ginsh_lexer.ll index 15185d66..cdb4237b 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-2004 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2008 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 */ @@ -26,6 +26,8 @@ * Definitions */ +%pointer + %{ #include "config.h" @@ -111,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;