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.0.tar.gz (22.3 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.0-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lark_run-0.1.0.tar.gz
  • Upload date:
  • Size: 22.3 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.0.tar.gz
Algorithm Hash digest
SHA256 709e9c2408a14398995b6009d9ed02fae1360a6c2d34e9e77eb9cd05c8695038
MD5 41ddfab80ab1775a30603d698447acac
BLAKE2b-256 62f1a4e5b67b5834a2ad5ad408a2ec61449427617757d429253f4cd1018d1240

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lark_run-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f542cfda925cb7efea6a661f8eaa4b12b5f6b122f58f164bbbaf4afe2edf5cb
MD5 659829f5bbc6d2d93706e28401e251cc
BLAKE2b-256 81a68d7d15f9e8e3b94780aea899937331f6cf1c22ed90b9a3dc986cad60dd39

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