lark
lark copied to clipboard
`cache` option does not work with `Reconstructor`
Describe the bug
If an lalr grammar is loaded from a cached file, and then the parser is passed to initialize a Reconstructor(...) class, initialization fails with the following error:
AttributeError: 'Lark' object has no attribute 'grammar'
To Reproduce
- Open a parser with
Lark.open(...)while setting thecacheargument to a file path. - Try to initialize a
Reconstructor(...)with that parser.