Hi, 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.
Hi Jan,
Is this a bug or is this syntax for lists no longer supported?
yes, it is a bug. Thanks for reporting! I made a bug fix which is available in the git repository. The bug fix is a bit dirty since it introduces a new public class and can not deal with the ginsh syntax using {}. If you would compile now from git, you could do GiNaC::ex e = reader("H(lst(0),x)"); or GiNaC::ex e = ex("H(lst(0),x)", GiNaC::lst(x)); as anticipated. Whether the {} syntax should be recognized I cannot decide yet. It needs some consideration. But anyway, the fix will of course stay, i.e. the above code will work now and in the future. Regards, Jens
participants (2)
-
Jan Piclum
-
Jens Vollinga