Skip to main content

python-asdl

https://travis-ci.org/fpoli/python-asdl.svg?branch=master

A copy of the ASDL parser used in CPython 3.5, cleaned a bit and packaged here.

Installation

$ pip install asdl

Usage

from asdl import ASDLParser, parse

syntax = """
    module Lambda {
        term =
            Lambda(name x, term body) |
            Apply(term function, term argument) |
            Variable(name x)
    }
"""

print(ASDLParser().parse(syntax))

print(asdl.parse("./test/Python.asdl"))

Output:

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)])]))])

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)]), …

License

Same as CPython: Python Software Foundation License (LICENSE file included here).

Metadata

Release files for asdl 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asdl 0.1.5
File Size Uploaded Provenance Actions
asdl-0.1.5.tar.gz 10.5 kB Without provenance Details for asdl-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asdl 0.1.5
File Interpreter ABI Platform Actions
asdl-0.1.5-py2-none-any.whl Python 2 none any Details for asdl-0.1.5-py2-none-any.whl

Total release size: 17.7 kB

Release files / asdl-0.1.5.tar.gz

Download URL asdl-0.1.5.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
33fb0cd20fd08210fb98995b306bf098e4d17fc0b5e59f754c517c4cb0245d9d
BLAKE2b-256 checksum
How to use checksums
765dc8db2502e56ba60ccab83f60d19dffa418dd0a289dfd6e00a402864ef2b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / asdl-0.1.5-py2-none-any.whl

Download URL asdl-0.1.5-py2-none-any.whl
Size 7.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
852b3821907183ac10ad1b977006c3438f621c52b3790ea3c3ba6c742a2a62f4
BLAKE2b-256 checksum
How to use checksums
1387130fa7c32a710955c8713858ac207eb33139554a2f4b9856f641f8a61f54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for asdl 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page