GNOME Bugzilla – Bug 589569
Replace bison parser
Last modified: 2012-08-17 08:38:00 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.
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).
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.
Created attachment 220284 [details] [review] Fix for unowned memory read, and add back a test case.
Created attachment 221205 [details] [review] Replace lex/bison parser with hand-written parser
Review of attachment 221205 [details] [review]: Pushed, congratulations!
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.