Does anyone know of a well-maintained Swift libraries that focus specifically on parsing and evaluating mathematical expressions from strings.

This page summarizes the projects mentioned and recommended in the original post on /r/swift

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • swift-math-parser

    Math expression parser built with Point•Free's swift-parsing package

  • I found two; this one looking pretty well maintained: https://github.com/bradhowes/swift-math-parser

  • Swift-ParserKit

    A standalone monadic parser-combinator library

  • I have a small but well-documented parser-combinator library, and one of the examples is a simple PEMDAS parser, which I'm sure you could extend to include func(arg) -style named function calls.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • swift-parsing

    A library for turning nebulous data into well-structured data, with a focus on composition, performance, generality, and ergonomics.

  • No idea about parsing and evaluating in the same library, but there’s an excellent parser library from PointFree.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts