A minimal python parser, written in python
Project description
MiniPyParser
A minimal python parser, written in python
Installing
Local
$ pip install -e minipyparser
PyPI
$ pip install minipyparser
Using
# examples/hello_world.py
print("hello, from mars!")
# examples/main.py
from minipyparser import tokenizer
from minipyparser import parser
for ast in parser.parse(tokenizer.tokenize(open("hello_world.py"))):
print(ast)
$ cd examples
$ python main.py
Comment(value='examples/hello_world.py')
Call(head=Name(print), args=[Literal(value='hello, from mars!')])
2022 - Marcel Guinhos
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
minipyparser-0.1.0.tar.gz
(6.2 kB
view hashes)
Built Distribution
Close
Hashes for minipyparser-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f8f54998f0166aaa57199fb0bb444b4d239aabd3fd5f0bc269eca6cce12c59 |
|
MD5 | 5ec28ff25c1e3798abbcd8874478fb94 |
|
BLAKE2b-256 | d6dabe89c9b503fd96199ecf3ac5b176b3f9c7048f0f043931c44c510de27d7a |