Improvements in packaging.

The ziffers.lark file is not included in the installed package. This was
preventing users from importing the ziffers package from elsewhere.
This commit is contained in:
2023-02-16 07:39:51 +01:00
parent 1ff7e3b6d2
commit 0816ac65db
6 changed files with 24 additions and 4 deletions

View File

@ -6,10 +6,11 @@ from .mapper import ZiffersTransformer
grammar_path = Path(__file__).parent
grammar = grammar_path / "ziffers.lark"
grammar_folder = Path.joinpath(grammar_path, "spec")
grammar_file = Path.joinpath(grammar_folder, "ziffers.lark")
ziffers_parser = Lark.open(
grammar,
str(grammar_file),
rel_to=__file__,
start="root",
parser="lalr",