{"id":20778355,"url":"https://github.com/natelindev/modular-mini-c-compiler","last_synced_at":"2026-05-19T03:04:48.992Z","repository":{"id":92749510,"uuid":"100109808","full_name":"natelindev/Modular-Mini-C-Compiler","owner":"natelindev","description":"A Mini C Compiler","archived":false,"fork":false,"pushed_at":"2017-12-12T07:48:55.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-16T16:10:35.393Z","etag":null,"topics":["c","compiler","mips","mips-assembly","xml"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natelindev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-08-12T12:04:53.000Z","updated_at":"2023-01-19T22:21:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"42ae89ab-6898-4ede-991d-f14323f9d86d","html_url":"https://github.com/natelindev/Modular-Mini-C-Compiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natelindev/Modular-Mini-C-Compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natelindev%2FModular-Mini-C-Compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natelindev%2FModular-Mini-C-Compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natelindev%2FModular-Mini-C-Compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natelindev%2FModular-Mini-C-Compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natelindev","download_url":"https://codeload.github.com/natelindev/Modular-Mini-C-Compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natelindev%2FModular-Mini-C-Compiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267485610,"owners_count":24095283,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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","mips","mips-assembly","xml"],"created_at":"2024-11-17T13:21:03.996Z","updated_at":"2026-05-19T03:04:48.945Z","avatar_url":"https://github.com/natelindev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modular-Mini-C-Compiler\n\n## Introduction\n\nThis is a modular mini C compiler.\n\nIt can translate a subset of C language into MIPS assembly language.\n\nCurrently it's unfinished ,there are still a lot of work to do. Help is welcomed.\n\nBasic Module Functions are as follows.\n\n**PreProcessor**: delete comments.\n\n**Scanner**:  Tokenize the input stream.\n\n**Parser**: Generate Parse tree.\n\n**SemanticAnalyser**: Reduce the size and length of parse tree, make it into AST.\n\n**IR_Generator**: Translate the AST into IR (Intermediate Representation). In this case, we use linear three address IR.\n\n**Optimizer**: Not yet implemented. Will function as IR optimizer in order to reduce Time/Space Complexity in the future.\n\n**Code_Generator**: Generate RISC assembly code from IR.\n\n**XML_suit**: Parse the XML input and Generate the XML output. Note that XML format can be found at `XML_examples` directory.\n\n*[Warning] There are still a lot of work to be done, currently the XML input and output of each module is handled by the their own version of XML suit, this will be fixed in the future.* \n\n\n\n## Usage\n\nSuppose you have a file named test.c\n\n\u003cu\u003ePut the module binary in the root directory, and then\u003c/u\u003e (eg. `Scanner.exe`)\n\n#### Windows\n\n```powershell\nrun.bat test\n```\n\n#### Unix(Including macOS \u0026 Linux)\n\n```shell\n$./run.sh test\n```\n\nIf it prompts that the permission is denied.\n\nPlease execute this command first:\n\n```Shell\n$chmod 755 run.sh\n```\n\n\n\n## Thanks\n\nInspired by [bit-minic-compiler](https://github.com/jiweixing/bit-minic-compiler)  \n\n\n\n## Disclaimer\n\n- No code from bit-mini-compiler is taken to this project\n- This project is for educational purpose only,  I'm not responsible for the consequences of error assembly code it generated.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatelindev%2Fmodular-mini-c-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatelindev%2Fmodular-mini-c-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatelindev%2Fmodular-mini-c-compiler/lists"}