{"id":21655390,"url":"https://github.com/copper-leaf/kudzu","last_synced_at":"2025-10-05T18:12:35.104Z","repository":{"id":57732851,"uuid":"143943369","full_name":"copper-leaf/kudzu","owner":"copper-leaf","description":"A monadic (I think...) recursive-descent parser written in Kotlin","archived":false,"fork":false,"pushed_at":"2025-03-13T03:20:35.000Z","size":1205,"stargazers_count":23,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T21:21:43.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://copper-leaf.github.io/kudzu/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/copper-leaf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2018-08-08T01:07:05.000Z","updated_at":"2025-03-14T19:27:48.000Z","dependencies_parsed_at":"2024-05-13T19:51:26.843Z","dependency_job_id":null,"html_url":"https://github.com/copper-leaf/kudzu","commit_stats":{"total_commits":78,"total_committers":4,"mean_commits":19.5,"dds":0.05128205128205132,"last_synced_commit":"9225439778ff5bd502fe8eb45d25f27b5d3d21eb"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copper-leaf%2Fkudzu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copper-leaf%2Fkudzu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copper-leaf%2Fkudzu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/copper-leaf%2Fkudzu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/copper-leaf","download_url":"https://codeload.github.com/copper-leaf/kudzu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480462,"owners_count":21110946,"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":[],"created_at":"2024-11-25T08:32:13.129Z","updated_at":"2025-10-05T18:12:30.073Z","avatar_url":"https://github.com/copper-leaf.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kudzu\n\n\u003e A monadic (I think...) recursive-descent parser combinator written in Kotlin\n\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/copper-leaf/kudzu)\n![Maven Central](https://img.shields.io/maven-central/v/io.github.copper-leaf/kudzu-core)\n![Kotlin Version](https://img.shields.io/badge/Kotlin-1.8.20-orange)\n\nKudzu is a recursive-descent parser written in Kotlin, inspired by [Parsec](https://github.com/haskell/parsec), with the\ngoal of immutability, simplicity, testability, and multiplatform usability. It's designed to be a simple starting place \nfor writing smaller parsers to evaluate relatively simple grammars for other Copper-Leaf libraries, but flexible enough \nto be used for larger languages.\n\nNotable features:\n\n- Multiplatform targets: JVM, Android, JS Legacy, JS IR, iOS\n- No separate lexer/parser. You really just don't need it, so Kudzu omits it\n- Parser combinator structure means every piece of your grammar is a complete parser, and thus smaller parsing units can \n  be tested in isolation, but the combination of them creates the full language\n- Everything in Kudzu is immutable, and thus fully thread-safe\n- Built on top of [DeepRecursiveFunction](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-deep-recursive-function/#:~:text=Defines%20deep%20recursive%20function%20that,function%20use%20its%20invoke%20function.\u0026text=The%20block%20of%20code%20defines%20the%20body%20of%20a%20recursive%20function.)\n  to provide readable stacktraces and prevent StackOverflowErrors\n- No complicated DSL or arcane combinator operators required, just normal, readable Kotlin classes. You don't need a \n  Ph.D. in computational linguistics or functional programming to understand a Kudzu parser\n- Many useful combinators provided out of the box\n    - Boolean, Int, Double literals\n    - String and Character literals, with standard escaped characters (i.e. \\n) and Unicode sequences (i.e. \\u00A2)\n    - Identifiers\n    - Choice, repetition, optional higher-kinded parsers\n- Parses input to an Abstract Syntax Tree (AST) and provides facilities for simplifying and/or introspecting the AST \n- Line- and column-number source tracking\n- Generic expression parser with all the fixin's\n    - Customizable operator precedence\n    - Operators with prefix, postfix, and infix with both left- and right-recursive associativity\n    - Parentheses\n    - Simplify deeply-nested expressions AST to simpler representation\n\n# Supported Platforms/Features\n\n| Platform |\n|----------|\n| Android  |\n| JVM      |\n| iOS      |\n| JS       |\n| WasmJS   |\n\n# Installation\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\n// for plain JVM or Android projects\ndependencies {\n    implementation(\"io.github.copper-leaf:kudzu-core:{{gradle.version}}\")\n}\n\n// for multiplatform projects\nkotlin {\n    sourceSets {\n        val commonMain by getting {\n            dependencies {\n                implementation(\"io.github.copper-leaf:kudzu-core:{{gradle.version}}\")\n            }\n        }\n    }\n}\n```\n\n# Documentation\n\nSee the [website](https://copper-leaf.github.io/kudzu/) for detailed documentation and usage instructions.\n\n# License\n\nKudzu is licensed under the BSD 3-Clause License, see [LICENSE.md](https://github.com/copper-leaf/kudzu/tree/main/LICENSE.md).\n\n# References\n\n- [Parsec](https://github.com/haskell/parsec)\n- [JParsec](https://github.com/jparsec/jparsec)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopper-leaf%2Fkudzu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcopper-leaf%2Fkudzu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcopper-leaf%2Fkudzu/lists"}