After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589569 - Replace bison parser
Replace bison parser
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
Depends on:
Blocks: 632658 640685
 
 
Reported: 2009-07-24 05:22 UTC by Robert Ancell
Modified: 2012-08-17 08:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
First patch before merging actual math-parser code. (24.19 KB, patch)
2012-08-03 20:10 UTC, PioneerAxon
none Details | Review
Fix for unowned memory read, and add back a test case. (2.27 KB, patch)
2012-08-03 20:19 UTC, PioneerAxon
none Details | Review
Replace lex/bison parser with hand-written parser (118.49 KB, patch)
2012-08-14 23:29 UTC, PioneerAxon
committed Details | Review

Description Robert Ancell 2009-07-24 05:22:44 UTC
Bison is hard to use and ancient.  Consider a new parser.

Lemon (http://www.hwaci.com/sw/lemon/) is a good candidate, it is public domain, one file (can be distributed with gcalctool) and has simpler syntax.

Or consider a hand-written parser.
Comment 1 Robert Ancell 2012-04-01 23:00:36 UTC
Some work done on a hand written parser in the gcalctool-newparser branch:
http://git.gnome.org/browse/gcalctool/log/?h=gcalctool-new-parser

Note, it is preferrable to have a hand-written parser as then we can port to Vala (bug 640685).
Comment 2 PioneerAxon 2012-08-03 20:10:55 UTC
Created attachment 220283 [details] [review]
First patch before merging actual math-parser code.

The patch tries to solve problems before merging math-parser from https://bitbucket.org/PioneerAxon/math-parser . Copying all files from math-parser to source directory will work.
Comment 3 PioneerAxon 2012-08-03 20:19:16 UTC
Created attachment 220284 [details] [review]
Fix for unowned memory read, and add back a test case.
Comment 4 PioneerAxon 2012-08-14 23:29:44 UTC
Created attachment 221205 [details] [review]
Replace lex/bison parser with hand-written parser
Comment 5 Robert Ancell 2012-08-17 08:37:40 UTC
Review of attachment 221205 [details] [review]:

Pushed, congratulations!
Comment 6 Robert Ancell 2012-08-17 08:38:00 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.