{"id":13782753,"url":"https://github.com/t00sh/interpret","last_synced_at":"2025-05-11T16:32:32.517Z","repository":{"id":13889143,"uuid":"16587402","full_name":"t00sh/interpret","owner":"t00sh","description":"Basic interpreter for a basic language. (totally invented :))","archived":false,"fork":false,"pushed_at":"2014-02-06T17:54:12.000Z","size":152,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T15:34:21.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mozilla/bidpom","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t00sh.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":"2014-02-06T17:32:30.000Z","updated_at":"2020-05-15T15:15:21.000Z","dependencies_parsed_at":"2022-08-23T14:50:54.829Z","dependency_job_id":null,"html_url":"https://github.com/t00sh/interpret","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t00sh%2Finterpret","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t00sh%2Finterpret/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t00sh%2Finterpret/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t00sh%2Finterpret/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t00sh","download_url":"https://codeload.github.com/t00sh/interpret/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213838093,"owners_count":15645778,"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-08-03T18:01:43.519Z","updated_at":"2024-08-03T18:10:48.400Z","avatar_url":"https://github.com/t00sh.png","language":"C","readme":"interpret\n=========\n\nBasic interpreter for EVAL language. (totally invented :))\n\n### USAGE\ninterpret \u003c file\n\n### EVAL language\n\nThe language is executed line per line.\n\n##### Loop\nwhile(E)\n\tE\nend\n\n##### Test\nif(E)\n\tE\nend\n\n##### Variable declaration + affectation\nV = E\n\n##### Function call\nfoo(E)\n\n##### Comments\nStarting by #\neg:\na = a+b # A comment\n\n##### Grammar\nE = expression\nF = function\nR = float\no = operator\nV = variable\n\nE --\u003e if(E)\nE --\u003e while(E)\nE --\u003e end\nE --\u003e (E)\nE --\u003e F(E)\nE --\u003e V=E\nE --\u003e R\nE --\u003e V\nE --\u003e EoE\n\no --\u003e [+ - / ^ * % \u003e \u003c \u003c= \u003e= == !=]{1}\nV --\u003e [A-Za-z]+\nF --\u003e [A-Za-z]+\nR --\u003e [-+]{0,1}[0-9.]+\n\n##### Operators\n* a = b -\u003e true if a is egual b\n* a \u003e b -\u003e true if a greater than b\n* a \u003c b -\u003e true if a lower than b\n* a ~ b -\u003e true if a not egual to b\n* a + b -\u003e a add b\n* a - b -\u003e a sub b\n* a * b -\u003e a mul b\n* a % b -\u003e a mod b\n* a / b -\u003e a div b\n* a ^ b -\u003e a power b\n\n##### Operators priority\n* =, \u003e, \u003e, \u003c, ~          ===\u003e 1\n* +,-                    ===\u003e 2\n* *,/,%                  ===\u003e 3\n* ^                      ===\u003e 4\n\nYou can use the () for change the priority.\n\n##### Predefined functions\nprint(E) ===\u003e print the value of the expression\nabs(E)   ===\u003e calc the absolute value of the expression\nsqrt(E)  ===\u003e function sqrt\ncos(E)   ===\u003e function cos\n\n### EXAMPLES\nYou can read test.txt, it's a basic program written in EVAL.\nIt print all prime numbers between 1 and 1000.\n\n\n### TODO\n- The ELSE structure : if(E) E  else  E  end\n- Functions definitions : def:f(x) E end\n- Multi-parameters functions\n- Better errors management\n- Multi-chars operators\n- Multi-types (dynamic) : double, int, string, list\n- Very big numbers.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft00sh%2Finterpret","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft00sh%2Finterpret","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft00sh%2Finterpret/lists"}