Skip to content

cache option does not work with Reconstructor #1472

Open
@weaversam8

Description

@weaversam8

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions