[GiNaC-list] problem parsing "{"

Jan Piclum piclum at physik.rwth-aachen.de
Tue Jul 26 15:36:20 CEST 2011


I have a problem when I try to create expressions containing harmonic 
polylogarithms from strings. The example program (based on section 5.15.2 
of the tutorial)

#include <ginac/ginac.h>

int main() {
   GiNaC::symbol x;
   GiNaC::symtab table;
   table["x"] = x;
   GiNaC::parser reader(table);
   GiNaC::ex e = reader("H({0},x)");
   std::cout << e << std::endl;

terminates with the message

terminate called after throwing an instance of 'GiNaC::parse_error'
   what():  GiNaC: parse error at line 0, column 0: unexpected token, got: "{"
[GiNaC::ex GiNaC::parser::parse_primary()(parser/parser.cpp:161)]

However, using the H({0},x) in ginsh works fine. I am using GiNaC version 
1.6.1 on a 32bit Linux PC running openSUSE 11.3. The program was compiled 
with g++ version 4.5.0.

Is this a bug or is this syntax for lists no longer supported?

Thanks for your help. Best regards,
Jan Piclum.

More information about the GiNaC-list mailing list