{"id":21392725,"url":"https://github.com/in-line/calculator","last_synced_at":"2025-07-13T18:31:30.024Z","repository":{"id":114420475,"uuid":"223944162","full_name":"In-line/calculator","owner":"In-line","description":"Simple mathematical expression evaluator (aka calculator) built using Nom, Pratt Parser, LLVM, Cranelift and Relm.","archived":false,"fork":false,"pushed_at":"2019-11-25T12:39:42.000Z","size":36,"stargazers_count":53,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T15:54:42.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/In-line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-25T12:31:47.000Z","updated_at":"2025-04-03T07:23:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"d210127f-171b-48f4-b509-0482bad6bff0","html_url":"https://github.com/In-line/calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/In-line/calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fcalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fcalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fcalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fcalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/In-line","download_url":"https://codeload.github.com/In-line/calculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/In-line%2Fcalculator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265186652,"owners_count":23724716,"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","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":[],"created_at":"2024-11-22T13:42:26.180Z","updated_at":"2025-07-13T18:31:30.019Z","avatar_url":"https://github.com/In-line.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculator\n\nSimple mathematical expression evaluator (aka calculator) built using Nom, Pratt Parser, LLVM, Cranelift and Relm.\n\nEvery mathematical expression is parsed to lexical tokens using Nom. After initial parsing is complete, Pratt Parser algorithm is used to create AST (Abstract Syntax Tree) with right operator precedence.\n\nThere is simple interpreter implementation, which visits every AST node and computes result.\n\nAlongside interpreter there is JIT compiler implementation with Cranelift and LLVM backends.\n\nFor end-user every mathematical expression is evaluated simultaneously by the interpreter and JIT compiler. JIT and Interpretator are racing to compute value first.\n\n| Crate name        | Description                                                       |\n| ----------------- | ----------------------------------------------------------------- |\n| calculator_engine | Implementation of expression parser and execution modules         |\n| calculator_cli    | Simple CLI interface that reads input from command line arguments ![CLI](https://i.imgur.com/2MztNbE.gif) |\n| calculator_repl   | REPL with built-in basic syntax highlighting ![REPL](https://i.imgur.com/VPv3CuY.gif)                     |\n| calculator_gtk    | Simple cross-platform GTK GUI ![GTK UI](https://i.imgur.com/2kOWsZY.gif)                                    |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-line%2Fcalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fin-line%2Fcalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fin-line%2Fcalculator/lists"}