[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6639":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":29,"discoverSource":30},6639,"write-a-C-interpreter","lotabout\u002Fwrite-a-C-interpreter","lotabout","Write a simple interpreter of C. Inspired by c4 and largely based on it.",null,"C",4370,774,150,5,0,1,2,13,3,30.67,"GNU General Public License v2.0",false,"master",true,[],"2026-06-12 02:01:27","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.\u002Fxc hello.c\n.\u002Fxc -s hello.c\n\n.\u002Fxc xc.c hello.c\n.\u002Fxc xc.c xc.c hello.c\n```\n\n# About\n\nThis project is inspired by [c4](https:\u002F\u002Fgithub.com\u002Frswier\u002Fc4) 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\u002Fen`.\n\nThere is also a chinese version in my blog.\n\n1. [手把手教你构建 C 语言编译器（0）——前言](http:\u002F\u002Flotabout.me\u002F2015\u002Fwrite-a-C-interpreter-0\u002F)\n2. [手把手教你构建 C 语言编译器（1）——设计](http:\u002F\u002Flotabout.me\u002F2015\u002Fwrite-a-C-interpreter-1\u002F)\n3. [手把手教你构建 C 语言编译器（2）——虚拟机](http:\u002F\u002Flotabout.me\u002F2015\u002Fwrite-a-C-interpreter-2\u002F)\n4. [手把手教你构建 C 语言编译器（3）——词法分析器](http:\u002F\u002Flotabout.me\u002F2015\u002Fwrite-a-C-interpreter-3\u002F)\n4. [手把手教你构建 C 语言编译器（4）——递归下降](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-4\u002F)\n5. [手把手教你构建 C 语言编译器（5）——变量定义](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-5\u002F)\n6. [手把手教你构建 C 语言编译器（6）——函数定义](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-6\u002F)\n7. [手把手教你构建 C 语言编译器（7）——语句](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-7\u002F)\n8. [手把手教你构建 C 语言编译器（8）——表达式](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-8\u002F)\n0. [手把手教你构建 C 语言编译器（9）——总结](http:\u002F\u002Flotabout.me\u002F2016\u002Fwrite-a-C-interpreter-9\u002F)\n\n# Resources\n\nFurther Reading:\n\n- [Let's Build a Compiler](http:\u002F\u002Fcompilers.iecc.com\u002Fcrenshaw\u002F): An excellent\n    starting material for building compiler.\n\n\nForks:\n\n- [A fork that implement debugger for xc.c](https:\u002F\u002Fgithub.com\u002Fdescent\u002Fwrite-a-C-interpreter)\n\n\n# Licence\n\nThe original code is licenced with GPL2, so this code will use the same\nlicence.\n","这个项目是一个简单的C语言解释器，能够解释并运行C代码。核心功能包括词法分析、语法解析以及执行C程序的能力，通过递归下降解析技术来实现。该解释器还具备自我解释的功能，即可以解释自身的源代码。项目基于c4项目进行重写，旨在提高可读性和理解性，并附带详细的教程文章，帮助开发者逐步理解和构建自己的C语言解释器。适合用于教育场景，尤其是对编译原理感兴趣的初学者，以及希望深入了解C语言内部机制的开发人员。","2026-06-11 03:08:02","top_language"]