Consider replacing the in-house parser
@robertroth
Submitted by Robert Roth Link to original bug (#773583)
Description
Currently the calculator parser is an in-house grown, but hard to extend and fix without breaking existing features. Maybe we should consider replacing it with an existing math parser library. We had a discussion with several stakeholders on IRC regarding this topic, and the three options we have discussed are:
- math.js (http://mathjs.org) - written in javascript, no dependencies, we would need to find a way to use javascript as a scripting language and use mathjs for parsing (and possibly more). It has support for complex numbers, big numbers, custom functions, unit conversions, and more, looks like an active project. License is GPLv3.
- Equation (https://pypi.python.org/pypi/Equation/1.0) - would need to find a way to use python from Vala. First and last releases have also happened in 2014, nothing since then, good reason to look for something else.
- muparserx - http://muparserx.beltoforion.de/ - C++ equation parser, we would need to find a way of using C++ from Vala, which could be cumbersome, and has a BSD license.
The best candidate would be mathjs, but if anyone knows another (actively developed) project in a language that is easier to integrate, it would be nice to have other options.
Version: git master