{"id":24969306,"url":"https://github.com/yianandcode/pineapple-c","last_synced_at":"2025-04-16T03:47:41.404Z","repository":{"id":85968885,"uuid":"341633581","full_name":"YianAndCode/pineapple-c","owner":"YianAndCode","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-05T16:40:43.000Z","size":49,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T04:47:36.808Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YianAndCode.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-02-23T17:25:08.000Z","updated_at":"2024-03-10T03:45:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5b59e22-38fe-4eed-99ef-315941263f42","html_url":"https://github.com/YianAndCode/pineapple-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fpineapple-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fpineapple-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fpineapple-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YianAndCode%2Fpineapple-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YianAndCode","download_url":"https://codeload.github.com/YianAndCode/pineapple-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249192362,"owners_count":21227769,"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":"2025-02-03T14:37:10.189Z","updated_at":"2025-04-16T03:47:41.383Z","avatar_url":"https://github.com/YianAndCode.png","language":"C","readme":"# PINEAPPLE\n\npineapple lang 是一个简单的编程语言 demo。它包含了个手写的递归下降解析器和一个简单的解释器。虽然该语言甚至不是图灵完备的。但 pineapple 的主要目的是让编译原理初学者有一个预热，简单了解一个编程语言是怎么构建的。\n\n**本项目是 pineapple lang 的 C 实现**\n\n## 编译\u0026运行\n\n*注意，由于使用了 `regex.h` 库，在 Windows 下的编译可能会不通过*\n\n```bash\n# 把依赖拉取到本地\ngit submodule init \u0026\u0026 git submodule update\n# 创建编译目录\nmkdir build \u0026\u0026 cd build\n# 使用 cmake 生成 Makefile\ncmake ..\n# 编译\nmake\n# 运行\n./pineapple-c ../examples/hello-world.pineapple\n```\n\n## 小教程\n\n### GitHub\n - [write-a-programming-language-in-450-lines](https://github.com/karminski/write-a-programming-language-in-450-lines)\n\n### 知乎专栏\n - [牙医教你 450 行代码自制编程语言 - 1, 从 EBNF 开始](https://zhuanlan.zhihu.com/p/341405385)\n - [牙医教你 450 行代码自制编程语言 - 2, 两个魔法就可以实现永动机](https://zhuanlan.zhihu.com/p/341532964)\n - [牙医教你 450 行代码自制编程语言 - 3, 实现 Lexer 上篇](https://zhuanlan.zhihu.com/p/341840788)\n - [牙医教你 450 行代码自制编程语言 - 4, 实现 Lexer 下篇](https://zhuanlan.zhihu.com/p/342036670)\n - [牙医教你 450 行代码自制编程语言 - 5, 递归下降语法解析器](https://zhuanlan.zhihu.com/p/342333858)\n - [牙医教你 450 行代码自制编程语言 - 6, 后端](https://zhuanlan.zhihu.com/p/342457860)\n - [牙医教你 450 行代码自制编程语言 - 7, 后续该如何学习编译原理](https://zhuanlan.zhihu.com/p/342982862)\n\n## 贡献者\n - [karminski-牙医](https://github.com/karminski)\n - [Y!an](https://github.com/YianAndCode)\n\n## 开源协议\n - [MIT](LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyianandcode%2Fpineapple-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyianandcode%2Fpineapple-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyianandcode%2Fpineapple-c/lists"}