{"id":13782809,"url":"https://github.com/yifengyou/write-a-C-interpreter","last_synced_at":"2025-05-11T16:32:59.687Z","repository":{"id":59967779,"uuid":"104565954","full_name":"yifengyou/write-a-C-interpreter","owner":"yifengyou","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-23T12:29:17.000Z","size":73,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T11:53:14.782Z","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/yifengyou.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":"2017-09-23T12:29:07.000Z","updated_at":"2023-06-09T06:38:11.000Z","dependencies_parsed_at":"2022-09-25T11:27:06.434Z","dependency_job_id":null,"html_url":"https://github.com/yifengyou/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/yifengyou%2Fwrite-a-C-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifengyou%2Fwrite-a-C-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifengyou%2Fwrite-a-C-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yifengyou%2Fwrite-a-C-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yifengyou","download_url":"https://codeload.github.com/yifengyou/write-a-C-interpreter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253595941,"owners_count":21933475,"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-08-03T18:01:45.098Z","updated_at":"2025-05-11T16:32:59.396Z","avatar_url":"https://github.com/yifengyou.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"C interpreter that interpretes 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 (you may need the -m32 option on 64bit machines)\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 rewrited them all to make it more understable 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%2Fyifengyou%2Fwrite-a-C-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyifengyou%2Fwrite-a-C-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyifengyou%2Fwrite-a-C-interpreter/lists"}