[GiNaC-devel] bugs related to parser

Cedric Studerus cedricstuderus at gmail.com
Sun Dec 4 12:59:53 CET 2011


Dear GiNaC developer,

I'm using GiNaC version 1.6.2 with compiler gcc (Ubuntu/Linaro
4.5.2-8ubuntu4) 4.5.2

When working with the parser to read in user defined functions from strings
I noticed 3 things:

1)
parsing a user defined function (declared to have 1 argument) from a string
does not throw an exception when the string contains this function with
zero arguments.

2)
parsing products of user defined non-commutative functions returns a
commutative product

3)
The parser accepts userdefined functions with zero arguments and parsing
such a function does not throw when there is 1 argument.


I have attached a small file "main.cpp" such that you can reproduce this
behavior.

I'm using these user defined functions with zero arguments but it looks to
me like a hack and I would like to know if you are going to allow them (
e.g. with macro definition) or if you completely suppress them in future
releases of GiNaC.


Thank you very much!
Cedric Studerus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20111204/5b854753/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 1661 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/ginac-devel/attachments/20111204/5b854753/attachment.cpp>


More information about the GiNaC-devel mailing list