{"id":25834358,"url":"https://github.com/aykhm/yot-lang","last_synced_at":"2026-03-13T06:31:11.479Z","repository":{"id":57672743,"uuid":"265737271","full_name":"aykhm/yot-lang","owner":"aykhm","description":"LLVM frontend for Yot - a toy language","archived":false,"fork":false,"pushed_at":"2020-06-21T23:29:07.000Z","size":47,"stargazers_count":28,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-25T23:55:11.511Z","etag":null,"topics":["llvm","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/yotc","language":"Rust","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/aykhm.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":"2020-05-21T02:39:35.000Z","updated_at":"2025-10-03T13:16:16.000Z","dependencies_parsed_at":"2022-08-31T08:22:03.759Z","dependency_job_id":null,"html_url":"https://github.com/aykhm/yot-lang","commit_stats":null,"previous_names":["akmin04/yot-lang"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aykhm/yot-lang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykhm%2Fyot-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykhm%2Fyot-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykhm%2Fyot-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykhm%2Fyot-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aykhm","download_url":"https://codeload.github.com/aykhm/yot-lang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykhm%2Fyot-lang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30460548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["llvm","rust"],"created_at":"2025-03-01T00:37:24.798Z","updated_at":"2026-03-13T06:31:11.449Z","avatar_url":"https://github.com/aykhm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yotc\nLLVM frontend for yot - a toy language.\n\n*Loosely based off of LLVM Kaleidoscope*\n\n# Running\n* Install LLVM 9.0\n* Install yotc with `cargo install yotc`\n* For automatic linking (a.k.a. default output format \"executable\"), `gcc` needs to be in PATH\n* Usage: `yotc (path to file)`\n* Run `yotc --help` for more options\n\n# Yot Syntax\n* Note: every variable is a 32-bit `int` and functions must return an `int` as well. Comparison operators return 1 or 0\n* Functions:\n    * Regular syntax \n        ```\n        @sum[a, b] {\n            -\u003e a + b // -\u003e is the return keyword\n        }\n        ```\n    * Short-hand notation for just return statement\n        ```\n        @sum[a, b] -\u003e a + b;\n        ```\n    * External functions\n        ```\n        @!print[_, _];\n        ```\n    * Calling a function\n        ```\n        sum(a, b);\n        ```\n* Variables:\n    * Declaration with value\n        ```\n        @a = 5;\n        ```\n    * Declaration without value (will be assigned to trash value)\n        ```\n        @a;\n        ```\n    * Referencing a variable\n        ```\n        @b = a + 5;\n        ```\n* Operations\n    * Available operations `=`, `+`, `-`, `*`, `/`, `==`, `!=`, `\u003c`, `\u003e`, `\u003c=`, `\u003e=`.\n        ```\n        @a = (-b + 5) - 10 / -(5 - -2);\n        ```\n* Comments\n    * Comments start with `//` and tokens are ignored until the end of the line\n* Programs\n    * A program consists of just top-level functions (no global variables yet)\n    * `main` function entry point\n* Example\n    * See `examples/`\n    * Run by first generating the object file of `equals_ten.yot` with `yotc equals_ten.yot -f object-file`\n    * Compile and link `io.cpp` with `g++ io.cc equals_ten.o` to generate an executable\n\n# Todo\n* If, for, while statements\n* LLVM IR optimization\n* Support printing string literals\n* Better compiler errors\n    * Current errors are either vague or plain wrong and dont have any information about line number\n    * Most errors are caught by LLVM, meaning more ugly and vague error messages\n* More data types (float, bool, char)\n* Testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faykhm%2Fyot-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faykhm%2Fyot-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faykhm%2Fyot-lang/lists"}