lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.88k stars 414 forks source link

Create lark/grammars/__init__.py #1171

Closed chanicpanic closed 2 years ago

chanicpanic commented 2 years ago

lark.grammars is declared as a package in setup.py, but lark/grammars is missing an __init__.py.

Without it, attempting something like Lark.open_from_package("lark.grammars", "lark.lark") fails.

erezsh commented 2 years ago

Thanks!

Just fyi, what I usually do is Lark.open_from_package("lark", "grammars/lark.lark")

But there's no harm in having it both ways.