"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ginsh/ginsh_parser.cpp" between
ginac-1.7.11.tar.bz2 and ginac-1.8.0.tar.bz2

About: GiNaC (GiNaC is Not a CAS (Computer Algebra System)) is a C++ library for symbolic calculations.

ginsh_parser.cpp  (ginac-1.7.11.tar.bz2):ginsh_parser.cpp  (ginac-1.8.0.tar.bz2)
/* A Bison parser, made by GNU Bison 3.7. */ /* A Bison parser, made by GNU Bison 3.7.2. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Inc. Inc.
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
skipping to change at line 52 skipping to change at line 52
infringing on user name space. This should be done even for local infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros. variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */ USER NAME SPACE" below. */
/* Identify Bison output. */ /* Identify Bison output. */
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "3.7" #define YYBISON_VERSION "3.7.2"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */ /* Pure parsers. */
#define YYPURE 0 #define YYPURE 0
/* Push parsers. */ /* Push parsers. */
#define YYPUSH 0 #define YYPUSH 0
skipping to change at line 2184 skipping to change at line 2184
if (i != assigned_symbol_table.end()) if (i != assigned_symbol_table.end())
assigned_symbol_table.erase(i); assigned_symbol_table.erase(i);
return e[0]; return e[0];
} }
static ex f_unit(const exprseq &e) static ex f_unit(const exprseq &e)
{ {
return e[0].unit(e[1]); return e[0].unit(e[1]);
} }
static ex f_basic_log_kernel(const exprseq &e)
{
return basic_log_kernel();
}
static ex f_multiple_polylog_kernel(const exprseq &e)
{
return multiple_polylog_kernel(e[0]);
}
static ex f_ELi_kernel(const exprseq &e)
{
return ELi_kernel(e[0],e[1],e[2],e[3]);
}
static ex f_Ebar_kernel(const exprseq &e)
{
return Ebar_kernel(e[0],e[1],e[2],e[3]);
}
static ex f_Kronecker_dtau_kernel_4(const exprseq &e)
{
return Kronecker_dtau_kernel(e[0],e[1],e[2],e[3]);
}
static ex f_Kronecker_dtau_kernel_3(const exprseq &e)
{
return Kronecker_dtau_kernel(e[0],e[1],e[2]);
}
static ex f_Kronecker_dtau_kernel_2(const exprseq &e)
{
return Kronecker_dtau_kernel(e[0],e[1]);
}
static ex f_Kronecker_dz_kernel_5(const exprseq &e)
{
return Kronecker_dz_kernel(e[0],e[1],e[2],e[3],e[4]);
}
static ex f_Kronecker_dz_kernel_4(const exprseq &e)
{
return Kronecker_dz_kernel(e[0],e[1],e[2],e[3]);
}
static ex f_Kronecker_dz_kernel_3(const exprseq &e)
{
return Kronecker_dz_kernel(e[0],e[1],e[2]);
}
static ex f_Eisenstein_kernel_6(const exprseq &e)
{
return Eisenstein_kernel(e[0],e[1],e[2],e[3],e[4],e[5]);
}
static ex f_Eisenstein_kernel_5(const exprseq &e)
{
return Eisenstein_kernel(e[0],e[1],e[2],e[3],e[4]);
}
static ex f_Eisenstein_h_kernel_5(const exprseq &e)
{
return Eisenstein_h_kernel(e[0],e[1],e[2],e[3],e[4]);
}
static ex f_Eisenstein_h_kernel_4(const exprseq &e)
{
return Eisenstein_h_kernel(e[0],e[1],e[2],e[3]);
}
static ex f_modular_form_kernel_3(const exprseq &e)
{
return modular_form_kernel(e[0],e[1],e[2]);
}
static ex f_modular_form_kernel_2(const exprseq &e)
{
return modular_form_kernel(e[0],e[1]);
}
static ex f_user_defined_kernel(const exprseq &e)
{
return user_defined_kernel(e[0],e[1]);
}
static ex f_q_expansion_modular_form(const exprseq &e)
{
if ( is_a<Eisenstein_kernel>(e[0]) ) {
return ex_to<Eisenstein_kernel>(e[0]).q_expansion_modular_form(e[
1], ex_to<numeric>(e[2]).to_int());
}
if ( is_a<Eisenstein_h_kernel>(e[0]) ) {
return ex_to<Eisenstein_h_kernel>(e[0]).q_expansion_modular_form(
e[1], ex_to<numeric>(e[2]).to_int());
}
if ( is_a<modular_form_kernel>(e[0]) ) {
return ex_to<modular_form_kernel>(e[0]).q_expansion_modular_form(
e[1], ex_to<numeric>(e[2]).to_int());
}
throw(std::invalid_argument("first argument must be a modular form"));
}
static ex f_dummy(const exprseq &e) static ex f_dummy(const exprseq &e)
{ {
throw(std::logic_error("dummy function called (shouldn't happen)")); throw(std::logic_error("dummy function called (shouldn't happen)"));
} }
// Tables for initializing the "fcns" map and the function help topics // Tables for initializing the "fcns" map and the function help topics
struct fcn_init { struct fcn_init {
const char *name; const char *name;
fcnp p; fcnp p;
int num_params; int num_params;
skipping to change at line 2260 skipping to change at line 2359
{"sqrfree", f_sqrfree2, 2}, {"sqrfree", f_sqrfree2, 2},
{"sqrt", f_sqrt, 1}, {"sqrt", f_sqrt, 1},
{"subs", f_subs2, 2}, {"subs", f_subs2, 2},
{"subs", f_subs3, 3}, {"subs", f_subs3, 3},
{"tcoeff", f_tcoeff, 2}, {"tcoeff", f_tcoeff, 2},
{"time", f_dummy, 0}, // for Tab-completion {"time", f_dummy, 0}, // for Tab-completion
{"trace", f_trace, 1}, {"trace", f_trace, 1},
{"transpose", f_transpose, 1}, {"transpose", f_transpose, 1},
{"unassign", f_unassign, 1}, {"unassign", f_unassign, 1},
{"unit", f_unit, 2}, {"unit", f_unit, 2},
{"basic_log_kernel", f_basic_log_kernel, 0},
{"multiple_polylog_kernel", f_multiple_polylog_kernel, 1},
{"ELi_kernel", f_ELi_kernel, 4},
{"Ebar_kernel", f_Ebar_kernel, 4},
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_4, 4},
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_3, 3},
{"Kronecker_dtau_kernel", f_Kronecker_dtau_kernel_2, 2},
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_5, 5},
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_4, 4},
{"Kronecker_dz_kernel", f_Kronecker_dz_kernel_3, 3},
{"Eisenstein_kernel", f_Eisenstein_kernel_6, 6},
{"Eisenstein_kernel", f_Eisenstein_kernel_5, 5},
{"Eisenstein_h_kernel", f_Eisenstein_h_kernel_5, 5},
{"Eisenstein_h_kernel", f_Eisenstein_h_kernel_4, 4},
{"modular_form_kernel", f_modular_form_kernel_3, 3},
{"modular_form_kernel", f_modular_form_kernel_2, 2},
{"user_defined_kernel", f_user_defined_kernel, 2},
{"q_expansion_modular_form", f_q_expansion_modular_form, 3},
{nullptr, f_dummy, 0} // End marker {nullptr, f_dummy, 0} // End marker
}; };
struct fcn_help_init { struct fcn_help_init {
const char *name; const char *name;
const char *help; const char *help;
}; };
static const fcn_help_init builtin_help[] = { static const fcn_help_init builtin_help[] = {
{"acos", "inverse cosine function"}, {"acos", "inverse cosine function"},
skipping to change at line 2291 skipping to change at line 2408
{"factorial", "factorial function"}, {"factorial", "factorial function"},
{"lgamma", "natural logarithm of Gamma function"}, {"lgamma", "natural logarithm of Gamma function"},
{"tgamma", "Gamma function"}, {"tgamma", "Gamma function"},
{"log", "natural logarithm"}, {"log", "natural logarithm"},
{"psi", "psi function\npsi(x) is the digamma function, psi(n,x) the nth p olygamma function"}, {"psi", "psi function\npsi(x) is the digamma function, psi(n,x) the nth p olygamma function"},
{"sin", "sine function"}, {"sin", "sine function"},
{"sinh", "hyperbolic sine function"}, {"sinh", "hyperbolic sine function"},
{"tan", "tangent function"}, {"tan", "tangent function"},
{"tanh", "hyperbolic tangent function"}, {"tanh", "hyperbolic tangent function"},
{"zeta", "zeta function\nzeta(x) is Riemann's zeta function, zetaderiv(n, x) its nth derivative.\nIf x is a GiNaC::lst, it is a multiple zeta value\nzeta( x,s) is an alternating Euler sum"}, {"zeta", "zeta function\nzeta(x) is Riemann's zeta function, zetaderiv(n, x) its nth derivative.\nIf x is a GiNaC::lst, it is a multiple zeta value\nzeta( x,s) is an alternating Euler sum"},
{"G", "multiple polylogarithm (integral representation)"},
{"Li2", "dilogarithm"}, {"Li2", "dilogarithm"},
{"Li3", "trilogarithm"}, {"Li3", "trilogarithm"},
{"Li", "(multiple) polylogarithm"}, {"Li", "(multiple) polylogarithm"},
{"S", "Nielsen's generalized polylogarithm"}, {"S", "Nielsen's generalized polylogarithm"},
{"H", "harmonic polylogarithm"}, {"H", "harmonic polylogarithm"},
{"EllipticK", "complete elliptic integral of the first kind"},
{"EllipticE", "complete elliptic integral of the second kind"},
{"iterated_integral", "iterated integral"},
{"Order", "order term function (for truncated power series)"}, {"Order", "order term function (for truncated power series)"},
{"Derivative", "inert differential operator"}, {"Derivative", "inert differential operator"},
{nullptr, nullptr} // End marker {nullptr, nullptr} // End marker
}; };
#include "ginsh_extensions.h" #include "ginsh_extensions.h"
/* /*
* Add functions to ginsh * Add functions to ginsh
*/ */
 End of changes. 6 change blocks. 
2 lines changed or deleted 126 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)