{"id":26058053,"url":"https://github.com/maxomatic458/compiler","last_synced_at":"2025-06-20T12:34:02.422Z","repository":{"id":281032120,"uuid":"686156068","full_name":"maxomatic458/compiler","owner":"maxomatic458","description":"compiler for a custom programming language","archived":false,"fork":false,"pushed_at":"2025-03-06T15:44:41.000Z","size":337,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-26T20:53:10.492Z","etag":null,"topics":["compiler","llvm","programming-language"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/maxomatic458.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":"2023-09-01T22:23:12.000Z","updated_at":"2025-03-13T08:21:30.000Z","dependencies_parsed_at":"2025-03-06T16:46:43.973Z","dependency_job_id":null,"html_url":"https://github.com/maxomatic458/compiler","commit_stats":null,"previous_names":["maxomatic458/compiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxomatic458/compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxomatic458%2Fcompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxomatic458%2Fcompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxomatic458%2Fcompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxomatic458%2Fcompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxomatic458","download_url":"https://codeload.github.com/maxomatic458/compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxomatic458%2Fcompiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260945057,"owners_count":23086937,"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":["compiler","llvm","programming-language"],"created_at":"2025-03-08T12:00:02.494Z","updated_at":"2025-06-20T12:33:57.412Z","avatar_url":"https://github.com/maxomatic458.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository contains the code for a compiler for a custom programming language,\nwhich i developed as part of a \"Besondere Lernleistung\" (academic paper for school).\n\nThe paper is written in german and can be found in the `bll/` directory.\n\nThe compiler is written in Rust and uses LLVM IR as target language.\nIf a installation of clang (\u003e= 16) is available the compiler will output a executable binary.\n\n## Usage\n```\n./compiler \u003cinput-file\u003e\n```\n\n### Arguments\n- `-e`, `--emit-llvm`: Emit LLVM IR instead of compiling to binary\n- `-o`, `--output \u003cfile\u003e`: Output file for the binary (default: `./out.exe`)\n- `-h`, `--help`: Print help message\n- `-v`, `--version`: Print version information\n\n- `-d`, `--dont-write-output`: Don't write output to a file (intended for debugging)\n\n## Language\n\n### Syntax and Semantics\nThe syntax is inspired by Python and Rust.\n\n```py\nimport \"std/io.mx\"\n\nclass Foo { # class\n    inner: int64,\n}\n\ndef new() for Foo -\u003e Foo { # static method\n    return Foo { inner: 0 };\n}\n\ndef get_inner(self) for Foo -\u003e int64 { # method\n    return self.inner;\n}\n\ndef main() -\u003e int64 { # function + entry point\n\n    let mut foo = Foo::new(); # variable declaration\n\n    foo.inner = 0; # field reassignment\n\n    while (foo.inner) \u003c 10 { # while loop\n        foo.inner = foo.inner + 1;\n    }\n\n    println(\"The inner value is:\");\n    println(foo.get_inner().to_string());\n\n    return 0;\n}\n```\n\n### Other language features\n* No memory safety (the user is responsible for managing memory)\n* Use functions of the c standard library (e.g for I/O, memory allocation)\n* Generics\n* Operator overloading\n* Rather helpful error messages\n\nMore examples can be found in `example/` and `src/tests/`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxomatic458%2Fcompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxomatic458%2Fcompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxomatic458%2Fcompiler/lists"}