11 lines
216 B
Python
11 lines
216 B
Python
from lark import Lark
|
|
|
|
|
|
with open("termdef.lark") as parse_file:
|
|
parser = Lark(parse_file)
|
|
|
|
with open("betarules.rules") as b:
|
|
rules_text = "\n".join(b.readlines())
|
|
|
|
print(parser.parse(rules_text).pretty())
|
|
|