{"id":13782935,"url":"https://github.com/iambrj/cathy","last_synced_at":"2025-05-11T16:33:33.854Z","repository":{"id":134626341,"uuid":"173435485","full_name":"iambrj/cathy","owner":"iambrj","description":"An interpreter for a simple programming language","archived":false,"fork":false,"pushed_at":"2019-03-24T11:43:12.000Z","size":25,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T18:17:17.403Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/iambrj.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}},"created_at":"2019-03-02T10:42:25.000Z","updated_at":"2019-05-15T17:15:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"65a6d4ef-a92e-4640-adbf-a569e5ff5b11","html_url":"https://github.com/iambrj/cathy","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/iambrj%2Fcathy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrj%2Fcathy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrj%2Fcathy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrj%2Fcathy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iambrj","download_url":"https://codeload.github.com/iambrj/cathy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253596029,"owners_count":21933496,"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:48.492Z","updated_at":"2025-05-11T16:33:33.602Z","avatar_url":"https://github.com/iambrj.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Cathy\n\nA simple programming langauge.\n\n## Features currently implemented\n\n- User defined functions (through let binding)\n- User defined variables\n- Control structures - while, if-then-else\n- Lists\n- Integer arithmetic\n- Real arithmetic\n- Operator precedence\n- Associativity of operators\n- Parenthesization of expressions\n\n## Ideas for future\n\n- Polymorphism\n- Subtyping\n- Universal types\n- Exception handling system\n- General recursion\n- New datatypes - tuples, sums, variants, records\n- Syntactic sugar to implement for structure\n- Hexadecimal arithmetic\n- Case structure\n- Bit manipulation\n\n## Installation\n\nTo install cathy, first install gcc, flex and bison. Most Linux distributions come with these installed. If yours doesn't, use the package manager to install them. \n\nOn Arch Linux,\n\n```\nsudo pacman -S gcc flex bison\n```\n\nNext clone (or download as a .zip file using button above) the repository.\n\n```\ngit clone https://github.com/iambrj/cathy\ncd cathy\n```\n\nInstall and run cathy\n\n```\nmake\nmake clean # to remove temporary files generated\n./cathy\n```\n\n## Syntax\n\nIdentifiers for varible begin with an alphabet (lowercase or uppercase). Values for variables can be assigned using `=` operator.\n\n```\n\u003e a = 3\n =    3\n\u003e b = 4\n =    4\n\u003e a + b\n =    7\n```\n\n`if-then-else` block works as follows\n\n```\n\u003e if a \u003e b then a; else b;\n =    4\n```\nNote the use of `;` to end `then` and `else`\n\nFunctions can be defined using `let`. Example\n```\n\u003e let square(a) = a * a;\nDefined square\n```\nNote that function declarations must be terminated by a `;`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambrj%2Fcathy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiambrj%2Fcathy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambrj%2Fcathy/lists"}