{"id":20672164,"url":"https://github.com/jethrodaniel/z","last_synced_at":"2025-10-09T15:44:29.307Z","repository":{"id":118229073,"uuid":"249115661","full_name":"jethrodaniel/z","owner":"jethrodaniel","description":"c-ish didactic compiler experiments (wip, :ukraine: Слава Україні!)","archived":false,"fork":false,"pushed_at":"2021-06-07T00:14:22.000Z","size":294,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-10-09T15:44:28.300Z","etag":null,"topics":["assembly","compiler","recursive-descent-parser"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/jethrodaniel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2020-03-22T04:53:07.000Z","updated_at":"2025-02-20T05:04:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"578e8c91-8116-4609-b45b-71aab6e044bb","html_url":"https://github.com/jethrodaniel/z","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jethrodaniel/z","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jethrodaniel","download_url":"https://codeload.github.com/jethrodaniel/z/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jethrodaniel%2Fz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001648,"owners_count":26083147,"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-10-09T02:00:07.460Z","response_time":59,"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":["assembly","compiler","recursive-descent-parser"],"created_at":"2024-11-16T20:32:22.769Z","updated_at":"2025-10-09T15:44:29.303Z","avatar_url":"https://github.com/jethrodaniel.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# z\n\n![](https://github.com/jethrodaniel/z/workflows/ci/badge.svg)\n\nBuilding a C compiler along with Rui Ueyama's 9cc ([book][9cc-book], [repo][9cc]).\n\n## prereqs\n\nCrystal.\n\n## build/install\n\n```\ngit clone https://github.com/jethrodaniel/z \u0026\u0026 cd z \u0026\u0026 make\n```\n\n## usage\n\n```\n$ ./bin/z\nUsage: z [command] [arguments]\n    lex                              Lex input, output tokens\n    parse                            Parse input, output AST\n    dot                              Parse input, output graphviz dot\n    compile                          Compile input, output assembly\n    run                              Compile and run input\n    obj                              Analyze object files\n    -i                               Get input from stdin\n    -c                               Get input from string\n    -v, --version                    Show the version\n    -h, --help                       Show this help\n```\n\n## example\n\nSee the specs in the [spec/compiler directory](spec/compiler).\n\n```\n$ pushd spec/compiler/\n$ ../../bin/z run hi.c\nhi!\n$ ../../bin/z run main.c\nfib(0)  = 0\nfib(1)  = 1\nfib(2)  = 1\nfib(3)  = 2\nfib(4)  = 3\nfib(5)  = 5\nfib(6)  = 8\nfib(7)  = 13\nfib(8)  = 21\nfib(9)  = 34\nfib(10) = 55\nfib(11) = 89\nfib(12) = 144\n$ z run -c 'p(c){putchar(c);}main(){p(65);p(10);}'\nA\n```\n\n## license\n\nMIT\n\n## references\n\n\u003e If I have seen further, it is by standing upon the shoulders of giants.\n\u003e\n\u003e Sir Isaac Newton, 1675\n\nThanks, y'all.\n\n- https://web.archive.org/web/20191210114310/http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html\n- https://github.com/charly-lang/charly\n- https://github.com/mint-lang/mint\n- https://github.com/cia-foundation/TempleOS\n- http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf\n- https://www.sigbus.info/compilerbook\n  - english: https://translate.google.com/translate?hl=en\u0026sl=ja\u0026tl=en\u0026u=https%3A%2F%2Fwww.sigbus.info%2Fcompilerbook\n- https://github.com/rui314/chibicc\n- https://github.com/eatonphil/ulisp\n- unix history repo\n  - https://github.com/dspinellis/unix-history-repo/blob/Research-V2-Snapshot-Development/c/nc0/c00.c\n- [writing elf output](https://github.com/lazear/lass/blob/66771edd7fa883e0620b3e00777320e6577f7f33/assembler.c#L53)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjethrodaniel%2Fz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjethrodaniel%2Fz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjethrodaniel%2Fz/lists"}