Closed jillyj closed 2 years ago
Well, before parsing is complete, there is no single tree, but several fragments of trees.
You can find them in the instance of the parser state, ParserState.value_stack
(https://github.com/lark-parser/lark/blob/master/lark/parsers/lalr_parser.py#L92).
If you have an idea on how to make an API out of that, let me know.
Ok, I got it. I'll get the data from ParserState.value_stack
. Thanks!
Happy to help.
Generated parser: kestrelParser.zip
Code
Expected: can get
treeData
after parsing even if the statement is incomplete.