Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnyf/astutils
Bare essentials for building abstract syntax trees, and skeleton classes for PLY lexers and parsers.
https://github.com/johnyf/astutils
ast parse ply python syntax-tree
Last synced: 3 months ago
JSON representation
Bare essentials for building abstract syntax trees, and skeleton classes for PLY lexers and parsers.
- Host: GitHub
- URL: https://github.com/johnyf/astutils
- Owner: johnyf
- License: other
- Created: 2015-04-18T00:51:10.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2024-04-15T17:29:56.000Z (9 months ago)
- Last Synced: 2024-10-15T01:25:27.315Z (3 months ago)
- Topics: ast, parse, ply, python, syntax-tree
- Language: Python
- Homepage: https://pypi.org/project/astutils
- Size: 62.5 KB
- Stars: 16
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status][build_img]][ci]
About
=====Bare essentials for building abstract syntax trees (AST) and Python
`lex`-`yacc` ([PLY](https://github.com/dabeaz/ply)) parsers.
The package includes:- two classes for tree nodes: `Terminal`, `Operator`
- a `Lexer` and `Parser` class, and a helper function to erase and
rewrite the table files.The examples under `examples/` demonstrate how to use these classes to create
a richer AST, a parser, and different backends that use the same parser.These classes provide the boilerplate for parsing with PLY, and are based on
code that was developed in [`tulip`](
https://github.com/tulip-control/tulip-control)
and [`promela`](https://github.com/johnyf/promela).License
=======
[BSD-3](https://opensource.org/licenses/BSD-3-Clause), see file `LICENSE`.[build_img]: https://github.com/johnyf/astutils/actions/workflows/main.yml/badge.svg?branch=main
[ci]: https://github.com/johnyf/astutils/actions