]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_lexer.ll
[build] GiNaC can be built with CMake now.
[ginac.git] / ginsh / ginsh_lexer.ll
index 817df6ec1d505cb39266c16a70dd9765468380dd..7ba013efa0e017897338070658b3649895987844 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-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
@@ -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;