{"id":17032548,"url":"https://github.com/zhongzc/gparser","last_synced_at":"2026-05-02T01:33:12.395Z","repository":{"id":57435502,"uuid":"148462390","full_name":"zhongzc/gparser","owner":"zhongzc","description":"A naive parser combinator library","archived":false,"fork":false,"pushed_at":"2022-07-15T18:42:01.000Z","size":40,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-28T09:10:01.452Z","etag":null,"topics":["functional-programming","parser","parser-combinators","parser-library","python","python3"],"latest_commit_sha":null,"homepage":"https://gaufoo.com/gparser/","language":"Python","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/zhongzc.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}},"created_at":"2018-09-12T10:23:08.000Z","updated_at":"2020-02-20T14:56:56.000Z","dependencies_parsed_at":"2022-09-04T15:24:58.214Z","dependency_job_id":null,"html_url":"https://github.com/zhongzc/gparser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongzc%2Fgparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongzc%2Fgparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongzc%2Fgparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhongzc%2Fgparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhongzc","download_url":"https://codeload.github.com/zhongzc/gparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245020343,"owners_count":20548180,"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":["functional-programming","parser","parser-combinators","parser-library","python","python3"],"created_at":"2024-10-14T08:29:10.166Z","updated_at":"2026-05-02T01:33:12.346Z","avatar_url":"https://github.com/zhongzc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gparser\n[![PyPI](https://img.shields.io/pypi/v/gparser.svg)](https://pypi.python.org/pypi)\n[![Build Status](https://travis-ci.com/zhongzc/gparser.svg?branch=master)](https://travis-ci.com/zhongzc/gparser)\n[![codecov](https://codecov.io/gh/zhongzc/gparser/branch/master/graph/badge.svg)](https://codecov.io/gh/zhongzc/gparser)\n\nParsec-like thinking model + Python DSL = an intuitive and easy-to-use parser library ^^\n\n## Get Started\n\n- Install\n\n```sh\n$ pip install gparser\n```\n\n- Run\n\n```sh\n$ python3                                \nPython 3.6.7 (default, Oct 25 2018, 09:16:13) \n[GCC 5.4.0 20160609] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import gparser as gp\n...\n```\n\n## Hello World\n\nA toy parser:\n```python\nimport gparser as gp             # (1) import gparser\n\ndot = gp.char('.')               # (2) define a dot parser \nresult, restTxt = dot.run('./')  # (3) run the parser\n\nprint(result)                    # (4) print the result\n# Success(value=Result('.'))\n\nprint(result.get())\n# .\n\nprint(restTxt)\n# (1,2)\n# ./\n#  ^\n```\n\nUse `run_strict` to parse the entire input:\n```python\n...\nresult, restTxt = dot.run_strict('.foo')\n\nprint(result)\n# ParseError(msg='Excepted: \u003cEOF\u003e')\n\nprint(restTxt)\n# (1,2)\n# .foo\n#  ^\n```\n\n## More\n\nFor more detailed documentation, see [Gparser Document](https://gaufoo.com/gparser/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongzc%2Fgparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhongzc%2Fgparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhongzc%2Fgparser/lists"}