{"id":23392411,"url":"https://github.com/tamaroning/ironcc","last_synced_at":"2026-04-30T09:37:59.337Z","repository":{"id":111996281,"uuid":"409044871","full_name":"tamaroning/ironcc","owner":"tamaroning","description":"a toy C compiler written in Rust (llvm_sys) [new]","archived":false,"fork":false,"pushed_at":"2021-10-09T07:35:55.000Z","size":116,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T15:19:56.119Z","etag":null,"topics":["c-compiler","compiler","llvm"],"latest_commit_sha":null,"homepage":"","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/tamaroning.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":"2021-09-22T02:55:05.000Z","updated_at":"2023-01-26T00:36:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4e549ca-f010-4fc6-bfa0-cb9e5446cc59","html_url":"https://github.com/tamaroning/ironcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tamaroning/ironcc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fironcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fironcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fironcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fironcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tamaroning","download_url":"https://codeload.github.com/tamaroning/ironcc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tamaroning%2Fironcc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c-compiler","compiler","llvm"],"created_at":"2024-12-22T04:30:18.665Z","updated_at":"2026-04-30T09:37:59.315Z","avatar_url":"https://github.com/tamaroning.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ironcc\nA toy C compiler written in Rust which uses LLVM as backend.  \nironcc is aiming to suppport C99, and C11.  \n\n# Install\n```sh\n$ git clone https://github.com/tamaroning/ironcc.git\n$ cd ironcc\n$ cargo build\n```\n\n# Usage\n```sh\n$ ironcc \u003cfile path\u003e\n```\n\nTo show the usage and version, run:\n```sh\n$ ironcc\n```\n\n# Status\nironcc supports the following functions:\n\n- function definition\n- local variable declaration\n- return statement\n- assignment\n- types (int and pointer)\n- control syntax (if, else, for)\n- numerical literal\n- binary operations (+, -, *, /)\n- comparison operations (==, !=, \u003c, \u003e, \u003c=, \u003e=)\n- unary operations (+, -)\n\n# Syntax\n```\nprogram = top-level*\n\ntop-level = func-def\n\nfunc-def = declspec declarator \"{\" compound-stmt\n\nstmt = \"return\" expr \";\"\n        | \"if\" \"(\" expr \")\" stmt (\"else\" stmt)?\n        | \"for\" \"(\" expr-stmt expr? \";\" expr? \")\" stmt\n        | \"while\" \"(\" expr \")\" stmt\n        | \"{\" compound-stmt\n        | expr-stmt\n\ncompound-stmt = (declaration | stmt)* \"}\"\n\ndeclaration = declspec (declarator (\"=\" expr)? (\",\" declarator (\"=\" expr)?)*)? \";\"\n\ndeclspec = \"int\"\n\ndeclarator = \"*\"* \u003cident\u003e type-suffix\n\ntype-suffix = \"(\" func-params\n        |\"[\" \u003cnum\u003e \"]\"\n        | ε\n\nfunc-params = (param (\",\" param)*)? \")\"\n\nparam = declspec declarator\n\ntype-suffix = \"(\" func-params no\n        | \"[\" \u003cnum\u003e \"]\" type-suffix\n        | ε\n\nexpr-stmt = expr? \";\"\n\nexpr = assign\n\nassign = equality (\"=\" assign)?\n\nequality = relational (\"==\"|\"!=\" relational)*\n\nrelational = add ((\"\u003c\"|\"\u003e\"|\"\u003c=\"|\"\u003e=\") add)*\n\nadd = mul ((\"+\"|\"-\") mul)*\n\nmul = unary ((\"*\"|\"/\") unary)*\n\nunary = (\"+\" | \"-\" | \"*\" | \"\u0026\") unary\n        | postfix\n\npostfix = primary (\"[\" expr \"]\")*\n\nprimary = \"(\" expr \")\"\n        | \"sizeof\" unary\n        | \u003cident\u003e func-args?\n        | \u003cnum\u003e\n\nfunc-call = \u003cident\u003e \"(\" (assign (\",\" assign)*)? \")\"\n\n\u003cXXX\u003e means token.\n```\n\n# Todo\n- support arithmetic operations of pointers\n- support multi-[] operator (like a[3][4], b[0][1][3])","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamaroning%2Fironcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftamaroning%2Fironcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftamaroning%2Fironcc/lists"}