lark icon indicating copy to clipboard operation
lark copied to clipboard

`cache` option does not work with `Reconstructor`

Open weaversam8 opened this issue 1 year ago • 0 comments

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

  1. Open a parser with Lark.open(...) while setting the cache argument to a file path.
  2. Try to initialize a Reconstructor(...) with that parser.

weaversam8 avatar Sep 23 '24 18:09 weaversam8