]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_parser.yy
moved some common code to the 'tensor' class
[ginac.git] / ginsh / ginsh_parser.yy
index 50d2a23baeda22cece30cdd2f607cfa2edf5dd66..12aa103acd008366daec050b81844b2eb7e95e5e 100644 (file)
@@ -4,7 +4,7 @@
  *  This file must be processed with yacc/bison. */
 
 /*
- *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2002 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
@@ -209,7 +209,7 @@ exp : T_NUMBER              {$$ = $1;}
                }
        }
        | T_DIGITS '=' T_NUMBER {$$ = $3; Digits = ex_to<numeric>($3).to_int();}
-       | T_SYMBOL '=' exp      {$$ = $3; ex_to_nonconst_symbol($1).assign($3);}
+       | T_SYMBOL '=' exp      {$$ = $3; const_cast<symbol&>(ex_to<symbol>($1)).assign($3);}
        | exp T_EQUAL exp       {$$ = $1 == $3;}
        | exp T_NOTEQ exp       {$$ = $1 != $3;}
        | exp '<' exp           {$$ = $1 < $3;}
@@ -490,7 +490,7 @@ static ex f_transpose(const exprseq &e)
 static ex f_unassign(const exprseq &e)
 {
        CHECK_ARG(0, symbol, unassign);
-       ex_to_nonconst_symbol(e[0]).unassign();
+       const_cast<symbol&>(ex_to<symbol>(e[0])).unassign();
        return e[0];
 }
 
@@ -786,7 +786,7 @@ static char **fcn_completion(const char *text, int start, int end)
 void greeting(void)
 {
     cout << "ginsh - GiNaC Interactive Shell (" << PACKAGE << " V" << VERSION << ")" << endl;
-    cout << "  __,  _______  Copyright (C) 1999-2001 Johannes Gutenberg University Mainz,\n"
+    cout << "  __,  _______  Copyright (C) 1999-2002 Johannes Gutenberg University Mainz,\n"
          << " (__) *       | Germany.  This is free software with ABSOLUTELY NO WARRANTY.\n"
          << "  ._) i N a C | You are welcome to redistribute it under certain conditions.\n"
          << "<-------------' For details type `warranty;'.\n" << endl;
@@ -810,10 +810,10 @@ int main(int argc, char **argv)
 
        // Init help for operators (automatically generated from man page)
        insert_help("operators", "Operators in falling order of precedence:");
-#include "ginsh_op_help.c"
+#include "ginsh_op_help.h"
 
        // Init help for built-in functions (automatically generated from man page)
-#include "ginsh_fcn_help.c"
+#include "ginsh_fcn_help.h"
 
        // Help for GiNaC functions is added manually
        insert_help(builtin_help);