{"id":15420251,"url":"https://github.com/jakebailey/comb","last_synced_at":"2026-06-12T04:31:04.395Z","repository":{"id":110847063,"uuid":"85456847","full_name":"jakebailey/comb","owner":"jakebailey","description":"Parser combinator framework","archived":false,"fork":false,"pushed_at":"2017-03-28T16:26:43.000Z","size":663,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-12T22:31:53.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/jakebailey.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":"2017-03-19T06:54:09.000Z","updated_at":"2023-05-04T21:42:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"4529ffc7-f056-472e-b000-7e08985da881","html_url":"https://github.com/jakebailey/comb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jakebailey/comb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fcomb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fcomb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fcomb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fcomb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakebailey","download_url":"https://codeload.github.com/jakebailey/comb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakebailey%2Fcomb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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":[],"created_at":"2024-10-01T17:28:46.953Z","updated_at":"2026-06-12T04:31:04.375Z","avatar_url":"https://github.com/jakebailey.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# comb parser combinator framework\n\ncomb is an efficient parser combinator framework.\n\ncomb offers various useful parsers, including nonterminals such as\ncharacters, character ranges, tokens, and regular expressions. Also\nincluded are sequences, repetitions, and optional parsers.\n\nFor example, here is a parser that recognizes the decimal, octal,\nand hex integers accepted in Go.\n\n```go\nvar integerParser = comb.SequenceRunes(\n    comb.Maybe(\n        comb.Char('-'),\n    ),\n    comb.Or(\n        comb.SequenceRunes(\n            comb.Token(\"0x\", \"0X\"),\n            comb.OnePlusRunes(\n                comb.Or(\n                    comb.CharRange('a', 'z'),\n                    comb.CharRange('a', 'z'),\n                    combext.Digit(),\n                ),\n            ),\n        ),\n        combext.Digits(),\n    ),\n)\n```\n\n(Though, this is more succinctly expressed with a regular expression,\ngiving a moderate performance gain.)\n\ncomb uses a scanner which traverses a rune slice. All builtin parsers\nreturn results that are simply slices of the original data, keeping copying\nto a minimum.\n\nThe `combext` package offers other general-use parsers (such as alpha-numeric\ncharacters, whitespace, etc) that may be frequently needed, though not always\nused.\n\n## Examples\n\nIn the `_examples` directory, you can find examples of comb in use, including\na recursive expression calculator.\n\n\n## Other libraries\n\ncomb takes inspiration from the following Go parser combinator libraries:\n\n- [jmikkola/parsego](https://github.com/jmikkola/parsego)\n- [prataprc/goparsec](https://github.com/prataprc/goparsec)\n\nI tried both of these while writing a parser for another project.\nThey both offer some amount of good usability and performance,\nbut not enough to my liking. I thought the changes I would\nmake would be too breaking to turn into a reasonable PR, so here we are.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakebailey%2Fcomb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakebailey%2Fcomb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakebailey%2Fcomb/lists"}