{"id":13992923,"url":"https://github.com/fgdorais/lean4-parser","last_synced_at":"2026-01-23T15:39:34.935Z","repository":{"id":84789550,"uuid":"586647855","full_name":"fgdorais/lean4-parser","owner":"fgdorais","description":"Parser Combinator Library for Lean 4","archived":false,"fork":false,"pushed_at":"2025-12-19T00:02:06.000Z","size":13498,"stargazers_count":66,"open_issues_count":3,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-21T23:07:07.508Z","etag":null,"topics":["lean","lean4"],"latest_commit_sha":null,"homepage":"","language":"Lean","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgdorais.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-01-08T21:16:12.000Z","updated_at":"2025-12-19T00:02:25.000Z","dependencies_parsed_at":"2023-12-28T22:27:10.975Z","dependency_job_id":"9f17423f-a8cc-4fc5-bb63-d2e09dcd76f7","html_url":"https://github.com/fgdorais/lean4-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fgdorais/lean4-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgdorais%2Flean4-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgdorais%2Flean4-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgdorais%2Flean4-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgdorais%2Flean4-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgdorais","download_url":"https://codeload.github.com/fgdorais/lean4-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgdorais%2Flean4-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28694788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T14:15:13.573Z","status":"ssl_error","status_checked_at":"2026-01-23T14:09:05.534Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["lean","lean4"],"created_at":"2024-08-09T14:02:10.668Z","updated_at":"2026-01-23T15:39:34.927Z","avatar_url":"https://github.com/fgdorais.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"# Lean 4 / Parser\n\nA parser combinator library for [Lean 4](https://leanprover.github.io/).\n\nSource documentation is available at [www.dorais.org/lean4-parser/doc/](https://www.dorais.org/lean4-parser/doc).\n\n## Usage\n\nAdd this dependency to your project's `lakefile.toml`:\n\n```toml\n[[require]]\nname = \"Parser\"\ngit = \"https://github.com/fgdorais/lean4-parser\"\nrev = \"main\"\n```\nThen add `import Parser` at the top of any Lean file where you plan to use this library. \nFor example:\n```lean\nimport Parser\n\nopen Parser Char\n\n/--\nParses a list of sign-separated integers (no spaces) from an input string and returns the sum.\n-/\ndef parseSum : SimpleParser Substring Char Int := do\n  let mut sum : Int := 0\n  -- parse until all input is consumed\n  while ! (← test endOfInput) do\n    -- parse an integer (decimal only) and add to sum\n    sum := sum + (← ASCII.parseInt)\n  return sum\n\n-- returns 42\n#eval match parseSum.run \"11-1+2-3+33\" with\n  | .ok _ sum =\u003e sum\n  | .error _ e =\u003e panic! (toString e)\n```\n\nThe `examples` directory contains more elaborate sample parsers.\n\n## Acknowledgements\n\nOriginal work for the Lean 4 Parser library was done by [François G. Dorais](https://github.com/fgdorais), [Kyrill Serdyuk](https://github.com/kyserd), and [Emma Shroyer](https://github.com/emma-shroyer).\nThis work was partly supported by the CEMS REU program at The University of Vermont.\n\n-----\n\n* The Parser library is copyright © 2022-2025 François G. Dorais, Kyrill Serdyuk, Emma Shroyer. The library is released under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0). See the file LICENSE for additional details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgdorais%2Flean4-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgdorais%2Flean4-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgdorais%2Flean4-parser/lists"}