{"id":23265718,"url":"https://github.com/mahadmuhammad/cs4031","last_synced_at":"2026-01-19T07:32:48.210Z","repository":{"id":267033967,"uuid":"857428094","full_name":"MahadMuhammad/cs4031","owner":"MahadMuhammad","description":"Simple simple C implementation for Compiler Construction Course ","archived":false,"fork":false,"pushed_at":"2024-12-08T09:07:23.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T12:56:58.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Yacc","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/MahadMuhammad.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":"2024-09-14T16:24:13.000Z","updated_at":"2024-12-08T09:07:26.000Z","dependencies_parsed_at":"2025-02-12T12:46:58.942Z","dependency_job_id":"5eae92f8-0ec3-493e-bd81-c187375ed651","html_url":"https://github.com/MahadMuhammad/cs4031","commit_stats":null,"previous_names":["mahadmuhammad/cs4031"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahadMuhammad%2Fcs4031","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahadMuhammad%2Fcs4031/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahadMuhammad%2Fcs4031/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MahadMuhammad%2Fcs4031/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MahadMuhammad","download_url":"https://codeload.github.com/MahadMuhammad/cs4031/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247450800,"owners_count":20940938,"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-12-19T15:32:06.953Z","updated_at":"2026-01-19T07:32:48.179Z","avatar_url":"https://github.com/MahadMuhammad.png","language":"Yacc","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compiler Using Flex, Bison, LLVM, and MLIR\n\nThis project is created and executed on **Ubuntu 22.04.4 LTS**. It uses **Flex 2.6.4** and **GNU Bison 3.8.2**. The project should work on other operating systems and software versions, but no guarantees are provided.\n\nThe videos explaining every aspect of this project are available on [YouTube](https://youtube.com/playlist?list=PLxP0p--aBHmL5uj9eecRFLIm1Qx2T8_sx\u0026si=LvvqhGXqyp8faGQG).\n\n## Project Organization\n\nThe project is organized into the following folders:\n\n- **ssc-flex-bison**: Contains code for the Simple Simple C compiler using Flex and Bison, but no LLVM intermediate code is generated.\n- **ssc-flex-bison-llvm**: Contains code for the Simple Simple C compiler using Flex, Bison, and LLVM intermediate code generation.\n\n## Requirements\n\n- Ubuntu 22.04.4 LTS or a similar Linux distribution\n- Flex 2.6.4\n- GNU Bison 3.8.2\n- Clang++\n\n## Compilation and Execution\n\n### Navigating to the Directory\n\nBefore running any commands, make sure to navigate to the appropriate directory where the `Makefile` is located. For example:\n\n```bash\ncd ssc-flex-bison\n```\n\n### Compiling the Compiler\n\nTo compile the SSC compiler, use the following command:\n\n```bash\nmake\n```\n\nThis will generate the executable for the SSC compiler using Flex and Bison.\n\n### Running the Compiler\n\nTo run the compiler with a sample input file (`input.ssc`), use:\n\n```bash\nmake run\n```\n\nThis command will compile the SSC code and output the results.\n\n### Cleaning Up\n\nTo remove compiled and intermediate files, run:\n\n```bash\nmake clean\n```\n\nTo remove all generated files, including the output executable, run:\n\n```bash\nmake distclean\n```\n\n### Help\n\nTo see the available `Makefile` commands, run:\n\n```bash\nmake help\n```\n\n## Files in the ssc-flex-bison Folder\n\n- `ssc.l`: The Flex file for the lexical analyzer\n- `ssc.y`: The Bison file for the syntax and semantic analyzer\n- `IR.h`: The header file containing all the C/C++ code.\n- `input.ssc`: A sample input file containing Simple Simple C code to test if the compiler works\n\n## Note\n\nEnsure that you are in the correct directory (`ssc-flex-bison` or `ssc-flex-bison-llvm`) before running any commands. Each folder has its own `Makefile` and files necessary for compilation and execution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahadmuhammad%2Fcs4031","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahadmuhammad%2Fcs4031","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahadmuhammad%2Fcs4031/lists"}