Skip to content

mguinhos/MiniPyParser

Repository files navigation

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

About

A minimal python parser, written in python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages