{"id":13936220,"url":"https://github.com/CarsonScott/expresol","last_synced_at":"2025-07-19T21:32:04.790Z","repository":{"id":93903254,"uuid":"126557414","full_name":"CarsonScott/expresol","owner":"CarsonScott","description":"Library for executing customizable script-languages in python","archived":false,"fork":false,"pushed_at":"2018-03-26T08:32:18.000Z","size":348,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-27T04:30:47.393Z","etag":null,"topics":["environment","language","parse","python","statement"],"latest_commit_sha":null,"homepage":"","language":"Python","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/CarsonScott.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":"2018-03-24T02:05:39.000Z","updated_at":"2022-04-30T03:13:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1bba4a4-6352-4d7f-ab3d-0305aedc71ad","html_url":"https://github.com/CarsonScott/expresol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CarsonScott/expresol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarsonScott%2Fexpresol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarsonScott%2Fexpresol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarsonScott%2Fexpresol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarsonScott%2Fexpresol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarsonScott","download_url":"https://codeload.github.com/CarsonScott/expresol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarsonScott%2Fexpresol/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"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":["environment","language","parse","python","statement"],"created_at":"2024-08-07T23:02:29.462Z","updated_at":"2025-07-19T21:31:59.780Z","avatar_url":"https://github.com/CarsonScott.png","language":"Python","readme":"# expresol\n\nExpresol is a library for executing customizable script-languages in python. The expresol library contains two main components, the memory and the parser, which collectively work as an information system whose data is accessible via statements that manipulate stored variables when executed. Each statement is converted to an executable form containing hierarchical sets of operators and data. Each set contains a set of elements, corresponding to either variables or operators. The most common possible structure of a valid statement is as follows: \n\n    (a + b)\n\ncontaining three elements, 'a', '+' and 'b', where the middle element denotes an operator and the rest denote variables. \n\nThe second possible structure is:\n\n    (~ a)\n\ncontaining two elements, '~' and 'a', where The left symbol denotes an operator and the right denotes a variable. \n\nThe last possible structure is:\n\n    (a)\n\nwhere 'a' denotes a variable. The identity function is assigned by default if no operator is present, meaning the output of this statement simply returns the value of 'a'. \n\n---\n\n## Example\n\n- Import library and create memory with 10 elements\n        \n        from expresol import *\n        memory = Memory(10)\n\n- Store functions, data, and syntax markers in memory  \n\n        memory.var(0, Marker('open'))\n        memory.var(1, Marker('close'))\n        memory.var(2, Marker('end'))\n        memory.var(3, AND)\n        memory.var(4, True)\n        memory.var(5, True)\n\n- Assign symbols to elements that allow data to be accessed when observed in a statement \n\n        memory.ref(0, '(', 'grammar')\n        memory.ref(1, ')', 'grammar')\n        memory.ref(2, ';', 'grammar')\n        memory.ref(3, '\u0026', 'operator')\n        memory.ref(4, 'x1', 'data')\n        memory.ref(5, 'x2', 'data')\n\n- Create parser and store data types with characters that are used to form valid symbols for instances of each type\n\n        parser = Parser()\n        parser.type('grammar', '();')\n        parser.type('operator', '\u0026|!+-*/=')\n        parser.type('number', '1234567890')\n        parser.type('data', 'abcdefghijklmnopqrstuvwxyz')\n\n- Store pairs of data types that reflect the valid transitions between consecutive elements in a statement\n\n        parser.rule('operator','operator')\n        parser.rule('grammar','none')\n        parser.rule('none','grammar')\n        parser.rule('data','number')\n        parser.rule('data','data')\n\n- Define and execute statement\n\n        statement = \"(x1 \u0026 x2);\"\n        output = parser(statement, memory)\n\n__OUTPUT:__ `True`\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarsonScott%2Fexpresol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCarsonScott%2Fexpresol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCarsonScott%2Fexpresol/lists"}