{"id":22086230,"url":"https://github.com/probablyclem/compiler","last_synced_at":"2025-07-24T21:33:33.038Z","repository":{"id":96819547,"uuid":"280939635","full_name":"ProbablyClem/compiler","owner":"ProbablyClem","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-05T19:27:01.000Z","size":245,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T21:22:39.353Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ProbablyClem.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-07-19T19:52:27.000Z","updated_at":"2020-09-20T18:50:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"02fbb141-c64e-404c-9b3f-409aa639c0ae","html_url":"https://github.com/ProbablyClem/compiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ProbablyClem/compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Fcompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Fcompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Fcompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Fcompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ProbablyClem","download_url":"https://codeload.github.com/ProbablyClem/compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ProbablyClem%2Fcompiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266905414,"owners_count":24004144,"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-07-24T02:00:09.469Z","response_time":99,"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":[],"created_at":"2024-12-01T01:22:21.979Z","updated_at":"2025-07-24T21:33:33.007Z","avatar_url":"https://github.com/ProbablyClem.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROO\n## Rust Object Oriented\n * Rust like syntax\n * Static typing\n * Made for OO\n * Borrow checker \n\n## Requirement\n * Linux\n * lcc (LLVM)\n * gcc\n\n## Installation\nClone the repos\u003c/br\u003e\nbuild with `make` \u003c/Br\u003e\n\n## usage\n```\n$./roo input_file\n```\ninput_file file being the file to compile. \u003c/br\u003e\nThen run\n```\n$./run.sh\n```\nto compile the llvm file into an executable and launch it.\nThe output will be ./a.out\n\n# Compiler Architecture\n## Lexer\n### scan.c\u003c/br\u003e\nConvert the code into token. \u003c/br\u003e\nThrow an error if the lexer don't recognize the input.\n\n## Parser\n### expr.c\u003c/br\u003e\nGenerate an AST from the tokens.\u003c/br\u003e\nThe tree is generated with the token's priority found in `OpPrec[]`. \u003c/br\u003e\nThrown an error if the input does't respect the grammar.\n### tree.c\nUtils for generating AST nodes.\n\n### stmt.c\nFunctions trees from statements such as functions or loops.\n\n### misc.c\nUtils requesting token such as colon().\n\n### types.c\nFunctions managing types compatibilities.\n\n## LLVM generator\n### gen.c\n\nGenerate llvm ir code from the AST.\u003c/br\u003e\n\n### cg.c\nUtils for generating llvm code.\n\n## Other\n### main.c\n[Entry]\u003c/br\u003e\nOpen and close files and calls other files?\n\n### data.h\nExpose global variables.\n\n### decl.h\nExpose public functions.\n\n### defs.h\nPublic Enums\n\n### delc.c\nUtils for declaring variables or functions.\n\n### sym.c\nFunctions managing the symbols tables.\n\n\n# Ressources\nCompiler tutorial : https://github.com/DoctorWkt/acwj \u003c/br\u003e\nLLVM IR doc : http://llvm.org/docs/LangRef.html \u003c/br\u003e\nLLVM IR unofficial guide : https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/README.html \u003c/br\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyclem%2Fcompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprobablyclem%2Fcompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprobablyclem%2Fcompiler/lists"}