pomsky-bin

Crates.iopomsky-bin
lib.rspomsky-bin
version0.11.0
sourcesrc
created_at2022-07-04 18:36:47.497358
updated_at2023-11-09 09:35:48.314986
descriptionCompile pomsky expressions, a new regular expression language
homepagehttps://pomsky-lang.org/
repositoryhttps://github.com/pomsky-lang/pomsky
max_upload_size
id619120
size87,081
Ludwig Stecher (Aloso)

documentation

README

Pomsky CLI

This CLI allows you to compile pomsky expressions to regexes in the command line.

Use pre-built binaries

Binaries are available for Windows, Linux and macOS. Download them from the releases page.

Install from source

This requires that a recent Rust toolchain is installed. Instructions for how to install Rust can be found here.

Install the CLI with

cargo install pomsky-bin

Usage

Then you can compile pomsky expressions to a regex flavor of your choice; the default is PCRE.

$ pomsky --help
pomsky 0.1.0
Ludwig Stecher <ludwig.stecher@gmx.de>
Compile pomsky expressions, a new regular expression language

USAGE:
    pomsky [OPTIONS] [INPUT]

ARGS:
    <INPUT>    Pomsky expression to compile

OPTIONS:
    -d, --debug              Show debug information
    -f, --flavor <FLAVOR>    Regex flavor [possible values: pcre, python,
                             java, javascript, dotnet, ruby, rust]
    -h, --help               Print help information
    -p, --path <FILE>        File containing the pomsky expression to compile
    -V, --version            Print version information

It provides nice error messages:

$ pomsky "'Hello world'* \X+"
Error:
  × Backslash escapes are not supported
   ╭────
 1 │ 'Hello world'* \X+
   ·                ─┬
   ·                 ╰── error occurred here
   ╰────
  help: Replace `\X` with `Grapheme`

License

Dual-licensed under the MIT license or the Apache 2.0 license.

Commit count: 395

cargo fmt