{"id":19152252,"url":"https://github.com/autokaka/refined_c_compiler","last_synced_at":"2026-03-01T06:34:23.364Z","repository":{"id":129021411,"uuid":"266690796","full_name":"Autokaka/refined_c_compiler","owner":"Autokaka","description":"A simple language compiler using flex and bison. Just a demo for someone to refer to.","archived":false,"fork":false,"pushed_at":"2020-06-05T10:09:28.000Z","size":1015,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-22T21:14:44.083Z","etag":null,"topics":["bison","bison-yacc","compile","compiler","compiler-principles","flex","lex","njtech","yacc"],"latest_commit_sha":null,"homepage":"https://github.com/Autokaka/refined_c_compiler","language":"Yacc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autokaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-25T05:26:58.000Z","updated_at":"2020-06-05T10:21:15.000Z","dependencies_parsed_at":"2023-03-22T05:33:17.356Z","dependency_job_id":null,"html_url":"https://github.com/Autokaka/refined_c_compiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Autokaka/refined_c_compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autokaka%2Frefined_c_compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autokaka%2Frefined_c_compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autokaka%2Frefined_c_compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autokaka%2Frefined_c_compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autokaka","download_url":"https://codeload.github.com/Autokaka/refined_c_compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autokaka%2Frefined_c_compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29962027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T05:59:08.471Z","status":"ssl_error","status_checked_at":"2026-03-01T05:58:04.208Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bison","bison-yacc","compile","compiler","compiler-principles","flex","lex","njtech","yacc"],"created_at":"2024-11-09T08:17:15.194Z","updated_at":"2026-03-01T06:34:18.351Z","avatar_url":"https://github.com/Autokaka.png","language":"Yacc","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Refined C Compiler\n\nA new language compiler defined by grammar in guidebook of Compiling Principle in Njtech University. For detailed instructions, please read the pdf file in ./doc\n\n## What is it?\n\nA homework made for handling Compiler Principle courses. This project is using **lex** and **yacc**, also known as **flex** and **bison**. If there is anyone taking this course in Njtech University, this might help you **A LOT**.\n\n## How to use it?\n\n1. **Download and install your own flex, bison and makefile environment, as all of them are the basic tools for cooking the whole project**. As for how to achieve that, you should search for it in yourself.\n2. `git clone https://github.com/Autokaka/refined_c_compiler.git`\n3. In termial, input:\n   - `make` to compile the compiler. The build files shall be generated “build” directory in your project root directory.\n   - `make demo` to compile and run an example file to help you understand how to use this simple compiler.\n   - `make clean` to clean the generated files and build files.\n4. **if you don’t have Makefile environment**, you can run these commands in the root directory of your project in terminal:\n   - `./make_all.sh` to compile the compiler. The build files shall be generated “build” directory in your project root directory.\n   - `./make_demo.sh` to compile and run an example file to help you understand how to use this simple compiler.\n   - `./make_clean.sh` to clean the generated files and build files.\n\n## What’s more\n\n1. If you need to know the detailed technique about how the script take effect, you can see all of them in `make_all.sh`, `make_clean.sh` and `make_demo.sh`. Talk is cheap in learning new things, you should always read the code :)\n\n2. **Please notice that the “C” here does not mean that c/c++ language.** The language itself has its own rules. The format of your code should follow the definition in ./doc/编译原理上机实验指导书.pdf and ./doc/修改好的LL(1)文法.md\n\n3. The whole project is built under the following environment. If you have problem in running scripts, please check if you meet the requirements below:\n\n   - OS: Mac OS Catalina 10.15.5\n\n   - Tools:\n\n     flex 2.5.35 Apple(flex-32)\n\n     bison (GNU Bison) 2.3\n\n     Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.5.0 Thread model: posix\n\n4. Here is the tutorial about how to install lex and yacc: https://www.youtube.com/watch?v=8EO5Y7KhoeU. It is a Youtube link, if you are in a country that cannot access foreign website, please use a VPN first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautokaka%2Frefined_c_compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautokaka%2Frefined_c_compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautokaka%2Frefined_c_compiler/lists"}