Metadata-Version: 2.4
Name: lark-run
Version: 0.1.1
Summary: A simple command-line interface for Lark, the parsing Library.
Author-email: Fábio Macêdo Mendes <fabiomacedomendes@gmail.com>
Requires-Python: >=3.13
Requires-Dist: lark-parser>=0.12.0
Requires-Dist: pyyaml>=6.0.3
Requires-Dist: rich>=15.0.0
Requires-Dist: typer>=0.26.6
Description-Content-Type: text/markdown

# Lark Run

A simple command-line interface for Lark, the parsing Library.


## Installation

You can install Lark Run using pip:

```bash
pip install lark-run
```

Or let uv or pipx handle it for you:

```bash
uvx lark-run YOUR_FILE.lark  # install automatically in the background
```

# Usage

To use Lark Run, simply run the command followed by the path to your Lark
grammar file:

```bash
lark-run YOUR_FILE.lark
```

This will open a REPL where you can enter strings to be parsed according to the
grammar defined in `YOUR_FILE.lark`. The CLI will display the parse tree for
each input string.

You can also specify a test input file containing strings that should be
accepted or rejected by the grammar:

```bash
lark-run YOUR_FILE.lark -t TEST_INPUTS.yaml
```

It expects a YAML or JSON file with the following structure:

```yaml
accept:
  - "valid string 1"
  - "valid string 2"    
reject:
    - "invalid string 1"
    - "invalid string 2"
```