Skip to content

cache option does not work with Reconstructor #1472

Closed

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.

Activity

  1. erezsh commented on Aug 3, 2025

    @erezsh
    Member

    I think this can now be closed as fixed. Feel free to reopen if you think it's still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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