{"id":17229325,"url":"https://github.com/fpoli/python-asdl","last_synced_at":"2025-04-14T01:41:34.551Z","repository":{"id":57411771,"uuid":"48458134","full_name":"fpoli/python-asdl","owner":"fpoli","description":"ASDL parser taken from CPython 3.5","archived":false,"fork":false,"pushed_at":"2018-01-10T16:53:02.000Z","size":17,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T15:52:25.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpoli.png","metadata":{"files":{"readme":"README.rst","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":"2015-12-22T23:03:12.000Z","updated_at":"2023-02-15T14:14:48.000Z","dependencies_parsed_at":"2022-08-27T17:10:20.830Z","dependency_job_id":null,"html_url":"https://github.com/fpoli/python-asdl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fpython-asdl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fpython-asdl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fpython-asdl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpoli%2Fpython-asdl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpoli","download_url":"https://codeload.github.com/fpoli/python-asdl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809040,"owners_count":21164893,"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-10-15T04:47:28.098Z","updated_at":"2025-04-14T01:41:34.530Z","avatar_url":"https://github.com/fpoli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"python-asdl\n=================\n\n.. image:: https://travis-ci.org/fpoli/python-asdl.svg?branch=master\n    :target: https://travis-ci.org/fpoli/python-asdl\n\nA copy of the ASDL parser used in CPython 3.5, cleaned a bit and packaged here.\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install asdl\n\n\nUsage\n-----\n\n.. code-block:: python\n\n    from asdl import ASDLParser, parse\n\n    syntax = \"\"\"\n        module Lambda {\n            term =\n                Lambda(name x, term body) |\n                Apply(term function, term argument) |\n                Variable(name x)\n        }\n    \"\"\"\n\n    print(ASDLParser().parse(syntax))\n\n    print(asdl.parse(\"./test/Python.asdl\"))\n\nOutput:\n\n    Module(Lambda, [Type(term, Sum([Constructor(Lambda, [Field(name, x), Field(term, body)]), Constructor(Apply, [Field(term, function), Field(term, argument)]), Constructor(Variable, [Field(name, x)])]))])\n\n    Module(Python, [Type(mod, Sum([Constructor(Module, [Field(stmt, body, seq=True)]), Constructor(Interactive, [Field(stmt, body, seq=True)]), Constructor(Expression, [Field(expr, body)]), Constructor(Suite, [Field(stmt, body, seq=True)])])), Type(stmt, Sum([Constructor(FunctionDef, [Field(identifier, name), Field(arguments, args), Field(stmt, body, seq=True), Field(expr, decorator_list, seq=True), Field(expr, returns, opt=True)]), ...\n\n\nLicense\n-------\n\nSame as CPython: Python Software Foundation License (LICENSE file included\nhere).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpoli%2Fpython-asdl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpoli%2Fpython-asdl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpoli%2Fpython-asdl/lists"}