{"id":16956142,"url":"https://github.com/novara754/yu","last_synced_at":"2025-03-21T12:47:53.806Z","repository":{"id":106797666,"uuid":"293585275","full_name":"novara754/yu","owner":"novara754","description":"A toy programming language implemented in Haskell.","archived":false,"fork":false,"pushed_at":"2020-10-03T16:43:13.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-26T09:13:00.128Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":false,"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/novara754.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}},"created_at":"2020-09-07T17:01:13.000Z","updated_at":"2020-10-03T16:43:16.000Z","dependencies_parsed_at":"2023-07-27T17:59:48.288Z","dependency_job_id":null,"html_url":"https://github.com/novara754/yu","commit_stats":null,"previous_names":["emilycrab/yu","novara754/yu"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novara754%2Fyu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novara754%2Fyu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novara754%2Fyu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novara754%2Fyu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novara754","download_url":"https://codeload.github.com/novara754/yu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244801279,"owners_count":20512635,"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-10-13T22:14:20.299Z","updated_at":"2025-03-21T12:47:53.772Z","avatar_url":"https://github.com/novara754.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![CI](https://github.com/vzwGrey/yu/workflows/CI/badge.svg?branch=master)\n\n# yu\n\nAn imperative toy programming language.\n\n## Usage\n\n**Requirements:** [GHC and Cabal](https://www.haskell.org/ghcup/#).\n\nThe project can be compiled using `cabal build`. It can also be ran using `cabal run`.\nCurrently the program will lex \u0026 parse the source code, report potential errors and if no errors\nwere found it will print the AST.\n```\n$ cabal run yu -- ./examples/simple.yu\n```\n\n## Examples\n\n**Note:** Not fully functional, subject to change.\n\n[`examples/simple.yu`](./examples/simple.yu)\n```\nmodule main;\n\n/*\n * Add two integers, double result and return it.\n */\nfun addTwice(x: int, y: int): int {\n    return (x + y) * 2;\n}\n\n/*\n * Entry point of the program.\n */\nfun main() {\n    let x: int = 5;\n    let y = 10;\n    let z = addTwice(x, y);\n    print(z); // -\u003e 30\n}\n```\n\n## Grammar\n\n```\nmodule        ::= (decl)* \n\ndecl          ::= module_decl\n                | function_decl\nmodule_decl   ::= \"module\" IDENT \";\"\nfunction_decl ::= \"fun\" IDENT \"(\" param (\",\" param)* \")\" \"{\" (statement \";\")* \"}\"\nparam         ::= IDENT \":\" IDENT\n\nstatement     ::= var_decl\n                | return\nvar_decl      ::= \"let\" IDENT (\":\" IDENT) \"=\" expr\nreturn        ::= \"return\" expr\n\nexpr          ::= expr_pre (call_tail)* (op_tail)*\nexpr_pre      ::= literal\n                | IDENT\n                | \"(\" expr \")\"\ncall_tail     ::= \"(\" expr (\",\" expr)* \")\"\nliteral       ::= INT_LITERAL\nop_tail       ::= operator expr\n\nOP_IDENT      ::= _one or more punctuation characters_\nINT_LITERAL   ::= _one or more decimal digits_\nIDENT         ::= _one or more alphanumeric characters or underscore_\n```\n\n## License\n\nLicensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovara754%2Fyu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovara754%2Fyu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovara754%2Fyu/lists"}