{"id":22445750,"url":"https://github.com/1boch1/murphy","last_synced_at":"2025-03-27T10:45:42.012Z","repository":{"id":189603375,"uuid":"457938517","full_name":"1boch1/murphy","owner":"1boch1","description":"Scanner, Parser and Interpreter of a simple functional programming language","archived":false,"fork":false,"pushed_at":"2024-04-01T21:51:12.000Z","size":46,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T15:35:00.918Z","etag":null,"topics":["functional-language","interpreted-programming-language","ocaml","programming-language"],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/1boch1.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":"2022-02-10T20:34:36.000Z","updated_at":"2024-07-24T11:56:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"51ac5b79-1ca8-4de9-bde6-c5d98522c447","html_url":"https://github.com/1boch1/murphy","commit_stats":null,"previous_names":["1boch1/murphy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1boch1%2Fmurphy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1boch1%2Fmurphy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1boch1%2Fmurphy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1boch1%2Fmurphy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1boch1","download_url":"https://codeload.github.com/1boch1/murphy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245832680,"owners_count":20679701,"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":["functional-language","interpreted-programming-language","ocaml","programming-language"],"created_at":"2024-12-06T03:16:44.505Z","updated_at":"2025-03-27T10:45:41.996Z","avatar_url":"https://github.com/1boch1.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Murphy\nScanner, Parser and Interpreter of a simple Functional Programming Language\n\n## Libraries\n\nNo external libraries were used, you only need to have OCaml installed.\n\n## Preview\n\n![image](https://user-images.githubusercontent.com/69087218/154868581-168e9e68-7087-4d62-895c-cbe33c2e805b.png)\n\n![image](https://user-images.githubusercontent.com/69087218/155034502-683f3c0b-81c0-4263-89cd-8bfe380b152b.png)\n\n\n\n## Project setup (Linux)\n\n- #### Compile the file murphy.ml\n\n  ### `ocamlc murphy.ml -o murphy.byte`\n\n- #### Write your code in a file name.txt and run it\n\n  ### `./murphy.byte ./name.txt`\n  \n  \n## Syntax\n\n- This language only works with Integer Numbers\n- IF, LET, IN, TEST, SUCCESS, FAIL, FUNC must be capitalized\n- Variables can't contain Capital Letters\n- Variables can't start with a Number\n\n### Algebraic expressions\n\n```javascript\n (exp)      //brackets\n exp + exp  //sum\n exp - exp  //difference\n exp * exp  //multiplication\n exp / exp  //division\n  ```\n  \n  examples\n  \n  ```javascript\n   5 - 2      //3\n   0/0        //NaN\n   2/0        //PLUS_INFINITY\n   5 - 1/0    //MINUS_INFINITY \n   2/0 - 3/0  //NaN\n   ...\n  ```\n  \n ### Comparison\n\n```javascript\n exp == exp\n exp \u003c exp\n exp \u003e exp\n  ```\n  \n  examples\n  \n  ```javascript\n   3 + 2 == 5   //TRUE\n   1 == 0       //FALSE\n   1 \u003e 0        //TRUE\n   1 \u003c 0        //FALSE\n   ...\n  ```\n  \n  ### TEST statement\n\n```javascript\n TEST exp [ == | \u003c | \u003e ] exp\n SUCCESS\n    exp\n FAIL \n    exp\n  ```\n  \n  examples\n  \n  ```javascript\n   TEST (5 + 5) / 2 == 5\n   SUCCES\n      10\n   FAIL\n      1/0\n   ...\n  ```\n  \n  ### LET statement\n\n```javascript\n LET ide = exp\n IN\n    exp\n  ```\n  \n  examples\n  \n  ```javascript\n   LET x = 1\n   IN\n   \n   LET y = 2\n   IN\n   \n   x*x + y*y\n   ...\n  ```\n  \n### Function declaration\n\n```javascript\n FUNC fname (ide1, ide2, ...) =\n    exp\n IN\n    exp\n  ```\n  \n  examples\n  \n  ```javascript\n   FUNC sum (x, y) = x + y\n   IN\n    5 + 5 \n   ...\n  ```\n  \n ### Function call\n\n```javascript\n fname (exp1, exp2, ...)\n  ```\n  \n  examples\n  \n  ```javascript\n   FUNC sum (x, y) = x + y\n   IN\n    TEST sum(2, 3) == 5\n    SUCCESS sum(2, 3)\n    FAIL 0\n   ...\n  ```\n \n\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1boch1%2Fmurphy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1boch1%2Fmurphy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1boch1%2Fmurphy/lists"}