{"id":18552980,"url":"https://github.com/lunarwhite/cminus-lexer-parser","last_synced_at":"2025-11-01T09:30:30.450Z","repository":{"id":39986644,"uuid":"493680841","full_name":"lunarwhite/cminus-lexer-parser","owner":"lunarwhite","description":"Build a simply lexer and parser for C minus (subset of C), using Java.","archived":false,"fork":false,"pushed_at":"2023-12-14T15:59:25.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-26T08:41:57.261Z","etag":null,"topics":["cminus","compiler","lexer","parser"],"latest_commit_sha":null,"homepage":"","language":"Java","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/lunarwhite.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":"2022-05-18T13:44:02.000Z","updated_at":"2023-02-12T12:38:04.000Z","dependencies_parsed_at":"2024-12-26T08:41:01.441Z","dependency_job_id":"6e42a4a3-15ed-43ae-90fc-73906b650ffa","html_url":"https://github.com/lunarwhite/cminus-lexer-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarwhite%2Fcminus-lexer-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarwhite%2Fcminus-lexer-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarwhite%2Fcminus-lexer-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lunarwhite%2Fcminus-lexer-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lunarwhite","download_url":"https://codeload.github.com/lunarwhite/cminus-lexer-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239278510,"owners_count":19612329,"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":["cminus","compiler","lexer","parser"],"created_at":"2024-11-06T21:15:42.810Z","updated_at":"2025-11-01T09:30:30.402Z","avatar_url":"https://github.com/lunarwhite.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cminus-lexer-parser\n\nBuild a simply lexer and parser for C minus (subset of C), using Java.\n\nExplore more details in this [blog post](https://lunarwhite.notion.site/Tiny-Lexer-and-Parser-for-CMinus-f5033869faa9425eab94cf8cf2539a92).\n\n## Structure\n\n- Lexer: \n  - Input a C source file to be syntactically analyzed, output the token sequence after the lexical analysis process, and return it with Java's built-in data structure ArrayList to provide a data source for subsequent lexical analysis.\n- Parser: \n  - The token sequence obtained from the lexical analysis of a program in the previous experiment is input, and the move-in statute sequence from the LR(1) analysis in the bottom-up syntax analysis is output. \n  - The sequence also shows the contents of the stack and contains error handling and hints. The program can automatically construct an LR(1) analysis table by entering the grammar.\n\n## Todo\n\n- Performance improvement. Too many switch-cases, too many nested if-else.\n- Complete unit tests to improve test coverage.\n- Simply GUI to improve user ease of use.\n\n## Reference\n\n- [Let's Build a Compiler, by Jack Crenshaw](https://compilers.iecc.com/crenshaw/)\n- [The LEMON Parser Generator](https://www.hwaci.com/sw/lemon/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarwhite%2Fcminus-lexer-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunarwhite%2Fcminus-lexer-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunarwhite%2Fcminus-lexer-parser/lists"}