{"id":24995003,"url":"https://github.com/typhoon-hil/cparser","last_synced_at":"2025-06-27T18:34:30.936Z","repository":{"id":47013877,"uuid":"151228851","full_name":"typhoon-hil/cparser","owner":"typhoon-hil","description":"C parser writen in Python","archived":false,"fork":false,"pushed_at":"2025-03-03T13:36:04.000Z","size":472,"stargazers_count":12,"open_issues_count":3,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T22:51:23.839Z","etag":null,"topics":["c","parsing","python"],"latest_commit_sha":null,"homepage":"","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/typhoon-hil.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","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":"2018-10-02T09:12:12.000Z","updated_at":"2025-03-03T13:36:08.000Z","dependencies_parsed_at":"2024-11-28T14:34:36.865Z","dependency_job_id":"5c6ec85e-0c80-466c-b8c4-78878a053b01","html_url":"https://github.com/typhoon-hil/cparser","commit_stats":{"total_commits":79,"total_committers":3,"mean_commits":"26.333333333333332","dds":"0.10126582278481011","last_synced_commit":"c91980ab69593e62ca8301b5266a5e70b9893793"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typhoon-hil%2Fcparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typhoon-hil%2Fcparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typhoon-hil%2Fcparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typhoon-hil%2Fcparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typhoon-hil","download_url":"https://codeload.github.com/typhoon-hil/cparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247926509,"owners_count":21019501,"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":["c","parsing","python"],"created_at":"2025-02-04T15:25:55.812Z","updated_at":"2025-04-12T03:54:02.960Z","avatar_url":"https://github.com/typhoon-hil.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nA C parser based on `parglare \u003chttps://github.com/igordejanovic/parglare/\u003e`_ - a pure Python scannerless LR/GLR parser.\n\nQuick intro\n-----------\n\n**cparser** is a parser for C language. This example shows how to\ncollect all IDs from a simple C code.\n\n.. code:: python\n\n    from cparser import CParser\n    from cparser.visitor import ASTVisitor\n\n    code = \"\"\"\n    typedef struct {\n        int element;\n        int weight;\n    } Atom;\n\n    Atom helium;\n    \"\"\"\n\n    class IDVisitor(ASTVisitor):\n        \"\"\"Visitor that collects all identifiers in the code.\"\"\"\n\n        def visit_id(self, node):\n            print(node.value)\n            return node\n\n    parser = CParser()\n    ast = parser.parse(code)\n\n    visitor = IDVisitor()\n    visitor.visit(ast)\n\n    # Output should look like this:\n    # element\n    # weight\n    # Atom\n    # Atom\n    # helium\n\n\nInstallation\n------------\n\n- Stable version:\n\n.. code:: shell\n\n    $ pip install cparser\n\n\n- Development version:\n\n.. code:: shell\n\n    $ git clone https://github.com/typhoon-hil/cparser.git\n    $ pip install -e cparser\n\nLicence\n-------\n\nMIT\n\nPython versions\n---------------\n\nTested with 3.6-3.9\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyphoon-hil%2Fcparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyphoon-hil%2Fcparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyphoon-hil%2Fcparser/lists"}