{"id":18677954,"url":"https://github.com/vrerv/simple-script-engine","last_synced_at":"2026-04-28T23:35:17.608Z","repository":{"id":241457337,"uuid":"805194389","full_name":"vrerv/simple-script-engine","owner":"vrerv","description":"Simple Expression Evaluator","archived":false,"fork":false,"pushed_at":"2024-08-02T02:59:10.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T21:13:54.195Z","etag":null,"topics":["android","java","jsr-223","scriptengine"],"latest_commit_sha":null,"homepage":"","language":"Java","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/vrerv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-24T04:33:41.000Z","updated_at":"2024-08-02T02:54:24.000Z","dependencies_parsed_at":"2024-11-07T09:37:49.586Z","dependency_job_id":"e4a26622-f0b5-418b-b1f0-6ae689c18191","html_url":"https://github.com/vrerv/simple-script-engine","commit_stats":null,"previous_names":["sh1nj1/simple-script-engine"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fsimple-script-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fsimple-script-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fsimple-script-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vrerv%2Fsimple-script-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vrerv","download_url":"https://codeload.github.com/vrerv/simple-script-engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239525437,"owners_count":19653328,"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":["android","java","jsr-223","scriptengine"],"created_at":"2024-11-07T09:35:33.817Z","updated_at":"2025-11-07T09:30:30.442Z","avatar_url":"https://github.com/vrerv.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Script Engine\n\n## Overview\n\nThe **Simple Script Engine** is a lightweight and versatile library for evaluating mathematical and logical expressions.\n\nThis implements JSR-223 ScriptEngine interface and provides a simple expression language for evaluating expressions.\n\n## Features\n\n- Supports basic arithmetic operations: +, -, *, /, and %.\n- Handles logical operations: AND, OR, and comparisons \u003c, \u003e, \u003c=, \u003e=, ==, !=\n- Supports parentheses for grouping expressions.\n- Adding human friendly operator tokens.\n\n| Token | Operation   |\n|-------|-------------|\n| and   | Logical AND |\n| or    | Logical OR  |\n| =     | Equal       |\n| not    | Not Equal   |\n\n### Android\n\n- The library is compatible with Android.\n- Tested on Android 8.0(API level 26) emulator\n- On Android, you can just use the SimpleExpressionEvaluator class directly.\n\n## Usage\n\nIt is required Java 17 or higher.\n\nTo add gradle dependency:\n```groovy\n    implementation 'com.github.vrerv:simple-script-engine:0.1.8'\n```\n\nTo evaluate an expression:\n```java\npublic static void main(String[] args) throws ScriptException {\n\n\tScriptEngine engine = new ScriptEngineManager().getEngineByName(\"SimpleExpressionEvaluator\");\n\tSimpleScriptContext scriptContext = new SimpleScriptContext();\n\tscriptContext.setBindings(new SimpleBindings(Map.of(\n\t\t\t\"a\", 10,\n\t\t\t\"b\", 20\n\t)), ScriptContext.ENGINE_SCOPE);\n\tSystem.out.println(\"Result: \" + engine.eval(\"a + b \u003e 10\", scriptContext));\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrerv%2Fsimple-script-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvrerv%2Fsimple-script-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvrerv%2Fsimple-script-engine/lists"}