{"id":31944231,"url":"https://github.com/marihachi/luna-parse","last_synced_at":"2025-10-14T10:22:26.929Z","repository":{"id":312468186,"uuid":"1047602935","full_name":"marihachi/luna-parse","owner":"marihachi","description":"A code generator of recursive descent parser and lexer.","archived":false,"fork":false,"pushed_at":"2025-09-29T18:27:10.000Z","size":203,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T18:42:19.112Z","etag":null,"topics":["code-generator","expression-parser","lexer","ll-parser","modifiable","parser","recursive-descent-parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/marihachi.png","metadata":{"files":{"readme":"README.ja.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-30T19:37:12.000Z","updated_at":"2025-09-29T18:27:13.000Z","dependencies_parsed_at":"2025-08-30T21:24:21.883Z","dependency_job_id":"3edc2010-5545-4ed7-95e2-409e923a260a","html_url":"https://github.com/marihachi/luna-parse","commit_stats":null,"previous_names":["marihachi/lunaparse-js","marihachi/luna-parse"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marihachi/luna-parse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marihachi%2Fluna-parse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marihachi%2Fluna-parse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marihachi%2Fluna-parse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marihachi%2Fluna-parse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marihachi","download_url":"https://codeload.github.com/marihachi/luna-parse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marihachi%2Fluna-parse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018780,"owners_count":26086451,"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-10-14T02:00:06.444Z","response_time":60,"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":["code-generator","expression-parser","lexer","ll-parser","modifiable","parser","recursive-descent-parser"],"created_at":"2025-10-14T10:22:26.134Z","updated_at":"2025-10-14T10:22:26.921Z","avatar_url":"https://github.com/marihachi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# luna-parse\n[English](https://github.com/marihachi/luna-parse/blob/main/README.md) | [日本語](https://github.com/marihachi/luna-parse/blob/main/README.ja.md)\n\nluna-parseはパーサージェネレーターです。\\\n仕様ファイルを記述することでコードを生成します。\n\nluna-parseはPEG(Parsing Expression Grammar)の思想から影響を受けています。\\\nしかし、バックトラックを行わない点はPEGとは異なります。\n\nluna-parseが生成するパーサーは、必要に応じて手作業で変更可能であるように設計されています。\\\nこれはパーサジェネレーターが現実のパーサーを完全に生成することは困難であるためです。\n\n現在開発を進めています！\n\n仕様ファイルの例:\n```\nparser ExampleParser {\n    root = topLevel+ ;\n    topLevel = declareVar / show ;\n    declareVar = VAR IDENT EQUAL expr SEMI ;\n    show = SHOW expr SEMI ;\n    term = NUMBER / IDENT ;\n\n    expr = expression {\n        atom term ;\n        operator group {\n            infix operator ASTA ;\n            infix operator SLASH ;\n        }\n        operator group {\n            infix operator PLUS ;\n            infix operator MINUS ;\n        }\n    };\n}\n\nlexer ExampleLexer {\n    ignored token SPACING = SPACE / LF ;\n    SPACE = \" \" ;\n    LF = \"\\r\\n\" / \"\\n\" ;\n    token ASTA = \"*\" ;\n    token SLASH = \"/\" ;\n    token PLUS = \"+\" ;\n    token MINUS = \"-\" ;\n    token EQUAL = \"=\" ;\n    token SEMI = \";\" ;\n    token SHOW = \"show\" ;\n    token VAR = \"var\" ;\n    token NUMBER = [1-9] [0-9]* =\u003e { token.value = text(); };\n    token IDENT = [a-zA-Z] [a-zA-Z0-9_]* =\u003e { token.value = text(); };\n}\n```\nパーサーへの入力：\n```\nvar n1 = 2;\nvar n2 = 3;\nshow n1 * n2 + 1;\n```\n\n## Get started\n\n## luna-parseって何？\nluna-parseはBNFから派生した言語を用いて文法を記述します。\\\n一般的に、従来のパーサージェネレータは生成されたパーサーを手動で変更しやすくは作られていません。そのため、パーサージェネレータを使わずにパーサーを手書きする方がメンテナンスがしやすくなっていました。\\\nしかし、luna-parseは再帰下降パーサを生成するので、後から容易に修正できます。\\\nluna-parseは式を効率的に解析できる式パーサも提供します。式パーサとしてはOperator-precedence parser (Precedence Climbing method)に基づくパーサーが生成されます。\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarihachi%2Fluna-parse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarihachi%2Fluna-parse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarihachi%2Fluna-parse/lists"}