GiNaC parser problems

Roberto Bagnara bagnara at cs.unipr.it
Sun Oct 20 09:37:58 CEST 2002


Hi there,

implementing interactive GiNaC programs is made extremely painful
by the fact that GiNaC's parser accepts too much.
This claim can be checked with the attached program derived from an
example in the tutorial.  Basically, stuff at the end of the string
sometimes is accepted even if nonsensical.  Moreover, once a well-formed
string has been parsed, things tend to be accepted anyway.

$ a.out
Enter an expression containing 'x': x.13 put what you want here
The derivative of x with respect to x is 1.

$ a.out
Enter an expression containing 'x': x.
The derivative of 0 with respect to x is 0.
Enter an expression containing 'x': x.13 put what you want here
The derivative of x with respect to x is 1.

Again:

$ a.out
Enter an expression containing 'x': 0
The derivative of 0 with respect to x is 0.
Enter an expression containing 'x': log(|x|)
The derivative of 0 with respect to x is 0.
Enter an expression containing 'x': log(|x|+put anything here)
The derivative of 0 with respect to x is 0.

All the best

      Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug.cc
Url: http://www.cebix.net/pipermail/ginac-list/attachments/20021020/46b23217/bug.cc


More information about the GiNaC-list mailing list