Skip to content
Snippets Groups Projects
Commit 7e0dda54 authored by Esteban Prince, Liam (UG - Computer Science)'s avatar Esteban Prince, Liam (UG - Computer Science)
Browse files

Upload New File

parent 7343ce82
No related branches found
No related tags found
No related merge requests found
from lark import Lark, tree
parser = Lark(open('grammar.lark', 'r'), start='start')
input = "quickly . and"
print(parser.parse(input).pretty())
# print to png file
tree.pydot__tree_to_png(parser.parse(input), 'ast.png')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment