{"id":23520427,"url":"https://github.com/redstar/m2lang","last_synced_at":"2025-04-09T19:19:43.852Z","repository":{"id":66340993,"uuid":"168878234","full_name":"redstar/m2lang","owner":"redstar","description":"The LLVM-based Modula-2 compiler","archived":false,"fork":false,"pushed_at":"2025-01-17T23:48:27.000Z","size":1373,"stargazers_count":71,"open_issues_count":5,"forks_count":13,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-09T19:19:39.581Z","etag":null,"topics":["ast-generator","compiler","llvm","llvm-frontend","modula-2","parser-generator"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redstar.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":"2019-02-02T21:06:42.000Z","updated_at":"2025-01-30T05:11:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"8999aabf-5566-49c4-9f15-5b66399e98e3","html_url":"https://github.com/redstar/m2lang","commit_stats":{"total_commits":397,"total_committers":1,"mean_commits":397.0,"dds":0.0,"last_synced_commit":"ce1bdf2b60a8b4d1bfc1e6ea4a57f920ba00bd8e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redstar%2Fm2lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redstar%2Fm2lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redstar%2Fm2lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redstar%2Fm2lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redstar","download_url":"https://codeload.github.com/redstar/m2lang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"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":["ast-generator","compiler","llvm","llvm-frontend","modula-2","parser-generator"],"created_at":"2024-12-25T16:13:11.183Z","updated_at":"2025-04-09T19:19:43.823Z","avatar_url":"https://github.com/redstar.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"m2lang - The LLVM-based Modula-2 compiler\n=========================================\n\n[![Build Status](https://img.shields.io/cirrus/github/redstar/m2lang/master?logo=Cirrus%20CI\u0026label=Cirrus%20CI)][1]\n\nIntroduction\n------------\n\nSee this [FOSDEM 2019 talk](https://fosdem.org/2019/schedule/event/llvm_irgen/) for some details.\n\nImplementation decisions\n------------------------\n\n - LLVM is only external dependency\n - Uses C++20 modules\n - xmake for building\n - ISO Modula-2 language first\n - Usea \"declare-before-use\" (single-pass) model\n - Goal is target several platforms from the beginning\n\nCurrent status\n--------------\n\n- The lexer is done.\n- The preprocessor (for handling of directives) is is based on the draft\n  technical report [\"Interfacing Modula-2 to C\", Annex B](http://www.zi.biologie.uni-muenchen.de/~enger/SC22WG13/im2c-981130.html#TR-AXI-PRAGMAS)\n  and aims to be compatible to the [Macintosh p1 compiler](https://modula2.awiedemann.de/manual/comp4.html#L4_2).\n  Parsing of directives is implemented, with mostly no functionality.\n- The parser is based on ISO Modula-2 with generic and OO additions.\n  Some LL(1) conflicts are still left in the grammar, so not every source is parsed correctly.\n- The parser is generated by [LLtool](https://github.com/redstar/LLtool). A C++\n  port of LLtool is now integrated into this project, but not yet enabled.\n- Error recovery in the parser is based on \"panic mode\", using the follow sets\n  of the current and the active callers.\n- The AST nodes are generated by [ASTtool](lib/ASTtool).\n- Error messages are outputted using llvm::SourceMgr for nice presentation.\n- Only a dummy driver exists to see the parser in action.\n- A couple of IR statements is emitted to the console after succesful parsing.\n\n[1]: https://cirrus-ci.com/github/redstar/m2lang \"Cirrus CI Build Status\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredstar%2Fm2lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredstar%2Fm2lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredstar%2Fm2lang/lists"}