Skip to main content

ASDL Parser

Project description

PyASDL

A yet another implementation for Zephyr ASDL format.

API

parse(source: str, *, filename: str = "<pyasdl>") -> Module

Parse the given source string, and return the AST in the shape of an pyasdl.Module. The full format is defined in the grammar.asdl file. The filename can be optionally supplied, and will be displayed if there is any syntax error.

fetch_comments(source: str) -> Iterator[str]:

Return an iterator of the ASDL comments in the given source string.

is_simple_sum(node: Sum) -> bool:

Check whether if the given node's all children lack any fields.

Examples

Here is a list of example tools that process the given ASDL with PyASDL:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyasdl-22.1.23.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

pyasdl-22.1.23-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page