{"id":27938647,"url":"https://github.com/jrosen081/mathparser","last_synced_at":"2025-08-01T20:12:36.186Z","repository":{"id":62447626,"uuid":"183463412","full_name":"jrosen081/MathParser","owner":"jrosen081","description":"A Swift library to parse mathematical expressions into Decimal values","archived":false,"fork":false,"pushed_at":"2019-05-30T18:34:05.000Z","size":54,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T18:09:22.650Z","etag":null,"topics":["mathematics","parser","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrosen081.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-25T15:38:44.000Z","updated_at":"2024-05-31T07:39:35.000Z","dependencies_parsed_at":"2022-11-01T23:08:53.450Z","dependency_job_id":null,"html_url":"https://github.com/jrosen081/MathParser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jrosen081/MathParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrosen081%2FMathParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrosen081%2FMathParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrosen081%2FMathParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrosen081%2FMathParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrosen081","download_url":"https://codeload.github.com/jrosen081/MathParser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrosen081%2FMathParser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268290752,"owners_count":24226646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mathematics","parser","swift"],"created_at":"2025-05-07T08:56:54.981Z","updated_at":"2025-08-01T20:12:36.159Z","avatar_url":"https://github.com/jrosen081.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MathParser\n\n[![CI Status](https://img.shields.io/travis/jrosen081/MathParser.svg?style=flat)](https://travis-ci.org/jrosen081/MathParser)\n[![Version](https://img.shields.io/cocoapods/v/MathParser.svg?style=flat)](https://cocoapods.org/pods/MathParser)\n[![License](https://img.shields.io/cocoapods/l/MathParser.svg?style=flat)](https://cocoapods.org/pods/MathParser)\n[![Platform](https://img.shields.io/cocoapods/p/MathParser.svg?style=flat)](https://cocoapods.org/pods/MathParser)\n\n## What it is:\nMathParser is a library written in swift that will allow a user to parse a String.\n\n## What you can do with it:\n* Addition\n* Subtraction\n* Multiplication\n* Division\n* Exponents\n* Overload the operators.\n\n## How to use:\nHere is an example of how to use the library.\n``` swift\nlet expr = Parser.parse(string: \"1 + 2\") // Will return an expression that can be evaluated.\nlet exprValue = expr?.evaluate() // Evaluates the expression (will be 3 in this example)\n```\n\nTo overload operators (this can be done if wanted):\n```swift\nOperators.addOp = \"\u003e\"\nlet ans = Parser.parse(string: \"1 \u003e 2\")?.evaluate() // This will evaluate to 3 with the new operator\n```\n\n## Public methods:\n* Parser.parse\n  * This returns an Optional Expression. This will return nil if the String is unparseable.\n* Expression.evaluate\n  * This returns an Optional Decimal. This will only return nil if there is a division by 0.\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n## Installation\n\nMathParser is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'MathParser'\n```\n\n## Author\n\njrosen081, jrosen081@gmail.com\n\n## License\n\nMathParser is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrosen081%2Fmathparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrosen081%2Fmathparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrosen081%2Fmathparser/lists"}