{"id":15101412,"url":"https://github.com/omarazizi/expression-compiler","last_synced_at":"2026-02-03T05:02:15.987Z","repository":{"id":244977128,"uuid":"816885555","full_name":"OmarAzizi/expression-compiler","owner":"OmarAzizi","description":"Simple Expression Compiler in C++ \u0026 LLVM","archived":false,"fork":false,"pushed_at":"2025-11-12T07:34:17.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-12T09:22:34.283Z","etag":null,"topics":["compiler","llvm","llvm-i"],"latest_commit_sha":null,"homepage":"","language":"C++","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/OmarAzizi.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":"2024-06-18T15:27:39.000Z","updated_at":"2025-11-12T07:34:20.000Z","dependencies_parsed_at":"2024-06-18T19:59:00.394Z","dependency_job_id":null,"html_url":"https://github.com/OmarAzizi/expression-compiler","commit_stats":null,"previous_names":["omarazizi/expression-compiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OmarAzizi/expression-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmarAzizi%2Fexpression-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmarAzizi%2Fexpression-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmarAzizi%2Fexpression-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmarAzizi%2Fexpression-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OmarAzizi","download_url":"https://codeload.github.com/OmarAzizi/expression-compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmarAzizi%2Fexpression-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29033716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T02:28:16.591Z","status":"ssl_error","status_checked_at":"2026-02-03T02:27:48.904Z","response_time":96,"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":["compiler","llvm","llvm-i"],"created_at":"2024-09-25T18:22:22.598Z","updated_at":"2026-02-03T05:02:15.969Z","avatar_url":"https://github.com/OmarAzizi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# expression-compiler\nThis is just me practicing compiler engineering after a long time of not doing so :)\n\n## How to Compile\nFirst clone the repository\n```bash\ngit clone https://github.com/OmarAzizi/expression-compiler.git \u0026\u0026 cd expression-compiler\n```\n\nThen make the `build` directory and change into it\n```bash\nmkdir build \u0026\u0026 cd build\n```\n\nRun the build command \n```bash\ncmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_DIR=/usr/lib/llvm ../ \u0026\u0026 ninja\n```\n\nThen go into the `src` directory inside of `build` where you will find the `calc` executable and run the following command:\n```bash\n./calc \"with a: a*3\" | llc -filetype=obj -relocation-model=pic -o=expr.o\n```\n**Note**: The expression could be changed to anything you want, with any amount of variables\n\nThen link `expr.o` with the runtime library `rtcalc.c` as follows:\n```bashclang -o expr expr.o ../../rtcalc.c\nclang -o expr expr.o ../../rtcalc.c\n```\nAfter running the `expr` executable you will be asked to input a value for `a`\n\n## Example of compiling an expression\n![image](https://github.com/OmarAzizi/expression-compiler/assets/110500643/2c14dfef-b7a3-41c9-bf79-857124d7b089)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarazizi%2Fexpression-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomarazizi%2Fexpression-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomarazizi%2Fexpression-compiler/lists"}