Skip to content

Import lark grammar written in one python project into another #1397

Description

@manjrekarom

What is your question?

How do I import lark grammar written in one python project into another.
E.g.
project A has A/grammar.lark file
project B can import A
But

// file called B/superset.py with inline grammar
...
%import A.grammar.SOME_TERMINAL

fails with FileNotFoundError: [Errno 2] No such file or directory: 'A/grammar.lark'

Explain what you're trying to do, and what is obstructing your progress.
I am not sure if there is a nice way to do this. We are able to %import common.<TERMINAL> so I would like to think there should be a way to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions