Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 825 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 825 Bytes

MiniPyParser

A minimal python parser, written in python

Upload Python Package

View License

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