Skip to main content

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

Project description

Lark Run

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

Installation

You can install Lark Run using pip:

pip install lark-run

Or let uv or pipx handle it for you:

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:

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:

lark-run YOUR_FILE.lark -t TEST_INPUTS.yaml

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lark_run-0.1.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lark_run-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file lark_run-0.1.1.tar.gz.

File metadata

  • Download URL: lark_run-0.1.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lark_run-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fcc08c8f58309847f78680b0190fed5e6e91ee2b23524815021e72af054f6561
MD5 9556558b1783f9c1542961eeec0b487f
BLAKE2b-256 d7a7fc7dca99a0110aab368129032f60b7f7360732e9a2fd8a5bb75e72eb4ee2

See more details on using hashes here.

File details

Details for the file lark_run-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lark_run-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lark_run-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef7b2310f8db402c50b4447ef8b733f4498b21446108c1663fe8ff6136cc0667
MD5 029feccc99d9633ac01bdad7c102669f
BLAKE2b-256 34eb5cafb2c16b51b105919ee25adb6e07b17b3d50c7f001a99b0f8c5be65152

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page