{"id":13430278,"url":"https://github.com/lotabout/write-a-C-interpreter","last_synced_at":"2025-03-16T05:30:39.949Z","repository":{"id":37251806,"uuid":"48469763","full_name":"lotabout/write-a-C-interpreter","owner":"lotabout","description":"Write a simple interpreter of C. Inspired by c4 and largely based on it.","archived":false,"fork":false,"pushed_at":"2024-03-29T09:30:51.000Z","size":159,"stargazers_count":4166,"open_issues_count":11,"forks_count":751,"subscribers_count":151,"default_branch":"master","last_synced_at":"2025-03-15T07:06:55.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lotabout.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":"2015-12-23T04:52:31.000Z","updated_at":"2025-03-14T06:21:36.000Z","dependencies_parsed_at":"2023-02-18T08:01:01.052Z","dependency_job_id":"beb4528c-6c3a-4623-9bb5-e8318bcb8d51","html_url":"https://github.com/lotabout/write-a-C-interpreter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotabout%2Fwrite-a-C-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotabout%2Fwrite-a-C-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotabout%2Fwrite-a-C-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lotabout%2Fwrite-a-C-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lotabout","download_url":"https://codeload.github.com/lotabout/write-a-C-interpreter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354848,"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-07-31T02:00:51.759Z","updated_at":"2025-03-16T05:30:39.917Z","avatar_url":"https://github.com/lotabout.png","language":"C","funding_links":[],"categories":["C","Misc","Tutorials"],"sub_categories":[],"readme":"C interpreter that interprets itself.\n\n# How to Run the Code\n\nFile `xc.c` is the original one and `xc-tutor.c` is the one that I make for\nthe tutorial step by step.\n\n```\ngcc -o xc xc.c\n./xc hello.c\n./xc -s hello.c\n\n./xc xc.c hello.c\n./xc xc.c xc.c hello.c\n```\n\n# About\n\nThis project is inspired by [c4](https://github.com/rswier/c4) and is largely\nbased on it.\n\nHowever, I rewrote them all to make it more understandable and help myself to\nunderstand it.\n\nDespite the complexity we saw in books about compiler design, writing one is\nnot that hard. You don't need that much theory though they will help for\nbetter understanding the logic behind the code.\n\nAlso I write a series of article about how this compiler is built under directory `tutorial/en`.\n\nThere is also a chinese version in my blog.\n\n1. [手把手教你构建 C 语言编译器（0）——前言](http://lotabout.me/2015/write-a-C-interpreter-0/)\n2. [手把手教你构建 C 语言编译器（1）——设计](http://lotabout.me/2015/write-a-C-interpreter-1/)\n3. [手把手教你构建 C 语言编译器（2）——虚拟机](http://lotabout.me/2015/write-a-C-interpreter-2/)\n4. [手把手教你构建 C 语言编译器（3）——词法分析器](http://lotabout.me/2015/write-a-C-interpreter-3/)\n4. [手把手教你构建 C 语言编译器（4）——递归下降](http://lotabout.me/2016/write-a-C-interpreter-4/)\n5. [手把手教你构建 C 语言编译器（5）——变量定义](http://lotabout.me/2016/write-a-C-interpreter-5/)\n6. [手把手教你构建 C 语言编译器（6）——函数定义](http://lotabout.me/2016/write-a-C-interpreter-6/)\n7. [手把手教你构建 C 语言编译器（7）——语句](http://lotabout.me/2016/write-a-C-interpreter-7/)\n8. [手把手教你构建 C 语言编译器（8）——表达式](http://lotabout.me/2016/write-a-C-interpreter-8/)\n0. [手把手教你构建 C 语言编译器（9）——总结](http://lotabout.me/2016/write-a-C-interpreter-9/)\n\n# Resources\n\nFurther Reading:\n\n- [Let's Build a Compiler](http://compilers.iecc.com/crenshaw/): An excellent\n    starting material for building compiler.\n\n\nForks:\n\n- [A fork that implement debugger for xc.c](https://github.com/descent/write-a-C-interpreter)\n\n\n# Licence\n\nThe original code is licenced with GPL2, so this code will use the same\nlicence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotabout%2Fwrite-a-C-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flotabout%2Fwrite-a-C-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flotabout%2Fwrite-a-C-interpreter/lists"}