Added list operations

This commit is contained in:
2023-02-03 01:02:37 +02:00
parent c66cc9b8ee
commit 63b292a7bd
6 changed files with 270 additions and 60 deletions

View File

@ -6,7 +6,7 @@ from lark import Lark
grammar_path = Path(__file__).parent
grammar = grammar_path / "ziffers.lark"
ziffers_parser = Lark.open(grammar, rel_to=__file__, start='value', parser='lalr', transformer=ZiffersTransformer())
ziffers_parser = Lark.open(grammar, rel_to=__file__, start='root', parser='lalr', transformer=ZiffersTransformer())
def parse_expression(expr):
return ziffers_parser.parse(expr)