Skip to content

Commit

Permalink
Rename rulex to pomsky
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloso committed Jul 2, 2022
1 parent f24972d commit 442ae42
Show file tree
Hide file tree
Showing 212 changed files with 292 additions and 303 deletions.
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

<!--
IMPORTANT: Use this template to report an issue with
- the compiler -- check if it can be reproduced here: https://rulex-rs.github.io/playground
- the compiler -- check if it can be reproduced here: https://playground.pomsky-lang.org/
- the CLI -- check the version you're using!
- the Rust macro
-->

### Describe the bug

A clear and concise description of what the bug is.

### To Reproduce
The rulex expression, the command, or the source code for reproducing the bug.

The pomsky expression, the command, or the source code for reproducing the bug.

### Expected behavior
A clear and concise description of what you expected to happen.

A clear and concise description of what you expected to happen.

### Additional context
How do you use rulex? E.g. via playground, the CLI, the Rust macro, NodeJS bindings, ...

How do you use Pomsky? E.g. via playground, the CLI, the Rust macro, NodeJS bindings, ...

If you use the CLI or a library, which version?

Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,13 @@ jobs:
draft: false
prerelease: false
body: |
This is a new release of `rulex`. See what's new in the [changelog](https://github.com/rulex-rs/rulex/blob/${{ steps.vars.outputs.tag }}/CHANGELOG.md).
This is a new release of Pomsky. See what's new in the [changelog](https://github.com/rulex-rs/pomsky/blob/${{ steps.vars.outputs.tag }}/CHANGELOG.md).
### Installation
If you're running on Linux, macOS or Windows, you can use the binaries below.
On Arch Linux, you can install the [AUR package](https://aur.archlinux.org/packages/rulex-rs-bin) with
```sh
yay -S rulex-rs-bin
```
You can also build `rulex` with Cargo, Rusts package manager. To install the Rust toolchain, see the [installation manual](https://www.rust-lang.org/tools/install). Then run
You can also build Pomsky with Cargo, Rusts package manager. To install the Rust toolchain, see the [installation manual](https://www.rust-lang.org/tools/install). Then run
```shell
$ cargo install rulex-bin
$ cargo install pomsky-bin
```
You might have to add the `.cargo/bin` folder to your `PATH` afterwards.
Please file issues if you run into any problems or have suggestions.
Expand Down Expand Up @@ -85,6 +80,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: rulex_${{ matrix.platform }}_${{ steps.vars.outputs.tag }}${{ matrix.file_ending }}
asset_path: target/release/rulex${{ matrix.file_ending }}
asset_name: pomsky_${{ matrix.platform }}_${{ steps.vars.outputs.tag }}${{ matrix.file_ending }}
asset_path: target/release/pomsky${{ matrix.file_ending }}
asset_content_type: application/octet-stream
40 changes: 20 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to the _rulex regular expression language_ will be documented in this file.
All notable changes to the _Pomsky regular expression language_ will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Expand Down Expand Up @@ -46,7 +46,7 @@ the ASCII line break.

### Fixed/improved

- [#29](https://github.com/rulex-rs/rulex/pull/29): Fix a miscompilation of a repeated empty group,
- [#29](https://github.com/rulex-rs/pomsky/pull/29): Fix a miscompilation of a repeated empty group,
e.g. `()?`. Thanks, [sebastiantoh](https://github.com/sebastiantoh)!

- Make the parser more permissive to parse arbitrary negated expressions. This results in better
Expand Down Expand Up @@ -75,14 +75,14 @@ the ASCII line break.
## [0.4.0] - 2022-06-03

The repository was moved to its own organization! 🎉 It also has a new website with an
[online playground](https://rulex-rs.github.io/playground/)!
[online playground](https://playground.pomsky-lang.org/)!

### Added

- API to selectively disable some language features

- [Online playground](https://rulex-rs.github.io/playground/) to try out rulex. You can write
rulex expressions on the left and immediately see the output on the right.
- [Online playground](https://playground.pomsky-lang.org/) to try out Pomsky. You can write
pomsky expressions on the left and immediately see the output on the right.

### Changed

Expand All @@ -92,18 +92,18 @@ The repository was moved to its own organization! 🎉 It also has a new website
runtime with regard to the number of digits.

- `ParseOptions` was moved out of `CompileOptions`. This means that the
[`parse_and_compile`](https://docs.rs/rulex/latest/rulex/struct.Rulex.html#method.parse_and_compile)
[`parse_and_compile`](https://docs.rs/rulex/0.4.0/rulex/struct.Rulex.html#method.parse_and_compile)
method now expects three parameters instead of two.

## [0.3.0] - 2022-03-29

### Added

- A [**book**](https://rulex-rs.github.io/), with instructions, a language tour and a formal
- A [**book**](https://pomsky-lang.org/docs/), with instructions, a language tour and a formal
grammar!

- **Variables**! For example, `let x = 'test';` declares a variable `x` that can be used below. Read
[this chapter](https://rulex-rs.github.io/docs/language-tour/variables) from the book to find
[this chapter](https://pomsky-lang.org/docs/language-tour/variables) from the book to find
out more.

- **Number range expressions**! For example, `range '0'-'255'` generates this regex:
Expand Down Expand Up @@ -133,9 +133,9 @@ The repository was moved to its own organization! 🎉 It also has a new website

- Improved Unicode support

- In addition to Unicode general categories and scripts, rulex now supports blocks and other
- In addition to Unicode general categories and scripts, pomsky now supports blocks and other
boolean properties
- Rulex now validates properties and tells you when a property isn't supported by the target
- Pomsky now validates properties and tells you when a property isn't supported by the target
regex flavor
- Shorthands (`[h]` and `[v]`) are substituted with character classes when required to support
Unicode everywhere
Expand All @@ -161,7 +161,7 @@ The repository was moved to its own organization! 🎉 It also has a new website

### Changed

- Improved the Rust macro; rulex expressions are written directly in the Rust source code, not in a
- Improved the Rust macro; pomsky expressions are written directly in the Rust source code, not in a
string literal:
```rs
let regex: &str = rulex!("hello" | "world" '!'+);
Expand All @@ -170,17 +170,17 @@ The repository was moved to its own organization! 🎉 It also has a new website
- Strings with more than 1 code point must be enclosed in double quotes, single quotes don't work
- Strings can't contain backslashes; this will be fixed in a future release
- Code points must be written without the `+`, e.g. `U10FFFF` instead of `U+10FFFF`
- Rulexes can contain Rust comments; they can't contain comments starting with `#`
- Pomsky expressions can contain Rust comments; they can't contain comments starting with `#`

## [0.1.0] - 2022-03-11

Initial release

[unreleased]: https://github.com/rulex-rs/rulex/compare/v0.4.3...HEAD
[0.4.3]: https://github.com/rulex-rs/rulex/compare/v0.4.2...v0.4.3
[0.4.2]: https://github.com/rulex-rs/rulex/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/rulex-rs/rulex/compare/v0.4...v0.4.1
[0.4.0]: https://github.com/rulex-rs/rulex/compare/v0.3...v0.4
[0.3.0]: https://github.com/rulex-rs/rulex/compare/v0.2...v0.3
[0.2.0]: https://github.com/rulex-rs/rulex/compare/v0.1...v0.2
[0.1.0]: https://github.com/rulex-rs/rulex/releases/tag/v0.1
[unreleased]: https://github.com/rulex-rs/pomsky/compare/v0.4.3...HEAD
[0.4.3]: https://github.com/rulex-rs/pomsky/compare/v0.4.2...v0.4.3
[0.4.2]: https://github.com/rulex-rs/pomsky/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/rulex-rs/pomsky/compare/v0.4...v0.4.1
[0.4.0]: https://github.com/rulex-rs/pomsky/compare/v0.3...v0.4
[0.3.0]: https://github.com/rulex-rs/pomsky/compare/v0.2...v0.3
[0.2.0]: https://github.com/rulex-rs/pomsky/compare/v0.1...v0.2
[0.1.0]: https://github.com/rulex-rs/pomsky/releases/tag/v0.1
64 changes: 32 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = ["./rulex-lib", "./rulex-bin", "./rulex-macro", "./benchmark"]
default-members = ["./rulex-bin", "./rulex-lib"]
members = ["./pomsky-lib", "./pomsky-bin", "./pomsky-macro", "./benchmark"]
default-members = ["./pomsky-bin", "./pomsky-lib"]

[profile.release]
lto = "thin"
Expand Down
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

![Crown in double quotes logo](./assets/logo.svg)

# rulex
# Pomsky

⚠️ Rulex will be renamed to pomsky. [Read the announcement](https://rulex-rs.github.io/blog/renaming-rulex/) ⚠️
⚠️ Rulex is being be renamed to Pomsky. [Read the announcement](https://pomsky-lang.org/blog/renaming-rulex/) ⚠️

A new, portable, regular expression language

Read **[the book](https://rulex-rs.github.io/docs/)** to get started!
Read **[the book](https://pomsky-lang.org/docs/)** to get started!

</div>

## Examples

On the left are rulex expressions (_rulexes_ for short), on the right is the compiled regex:
On the left are pomsky expressions, on the right is the compiled regex:

```py
# String
Expand Down Expand Up @@ -86,9 +86,9 @@ number (operator number)*

## Usage

Read **[the book](https://rulex-rs.github.io/docs)** to get started, or check out the
[CLI program](./rulex-bin/), the [Rust library](./rulex-lib/) and the
[procedural macro](./rulex-macro/).
Read **[the book](https://pomsky-lang.org/docs)** to get started, or check out the
[CLI program](./pomsky-bin/), the [Rust library](./pomsky-lib/) and the
[procedural macro](./pomsky-macro/).

## Why use this instead of normal regexes?

Expand All @@ -98,7 +98,7 @@ plethora of sigils and backslash escapes that follow no discernible system:
`(?<=) (?P<>) .?? \N \p{} \k<> \g''` and so on. And with various inconsistencies between regex
implementations, it's the perfect recipe for confusion.

Rulex solves these problems with a new, simpler but also more powerful syntax:
Pomsky solves these problems with a new, simpler but also more powerful syntax:

- It's not whitespace sensitive and allows comments
- Text must appear in quotes. This makes expressions longer, but also much easier to read
Expand All @@ -108,28 +108,29 @@ Rulex solves these problems with a new, simpler but also more powerful syntax:

## Compatibility

Rulex is currently compatible with PCRE, JavaScript, Java, .NET, Python, Ruby and Rust. The regex
flavor must be specified during compilation, so rulex can ensure that the produced regex works as
Pomsky is currently compatible with PCRE, JavaScript, Java, .NET, Python, Ruby and Rust. The regex
flavor must be specified during compilation, so pomsky can ensure that the produced regex works as
desired on the targeted regex engine.

**Note**: You should enable Unicode support in your regex engine, if it isn't enabled by default.
This is [explained here](https://rulex-rs.github.io/docs/get-started/enable-unicode/).
This is [explained here](https://pomsky-lang.org/docs/get-started/enable-unicode/).

## Security

**Never compile or execute an untrusted rulex expression on your critical infrastructure**.
**Never compile or execute an untrusted Pomsky expression on your critical infrastructure**.
This may make you vulnerable for denial of service attacks, like the
[Billion Laughs attack](https://en.wikipedia.org/wiki/Billion_laughs_attack).

[Read more](https://rulex-rs.github.io/docs/reference/security/)
[Read more](https://pomsky-lang.org/docs/reference/security/)

## Diagnostics

Rulex looks for mistakes and displays helpful diagnostics:
Pomsky looks for mistakes and displays helpful diagnostics:

- It shows an error if you use a feature not supported by the targeted regex flavor
- It detects syntax errors and shows suggestions how to resolve them
- It parses backslash escapes (which are not allowed in a rulex) and explains what to write instead
- It parses backslash escapes (which are not allowed in a pomsky expression) and explains what to
write instead
- It looks for likely mistakes and displays warnings
- It looks for patterns that can be very slow for certain inputs and are susceptible to
Denial-of-Service attacks _(coming soon)_
Expand All @@ -140,7 +141,7 @@ Rulex looks for mistakes and displays helpful diagnostics:

## Contributing

You can contribute by using rulex and providing feedback. If you find a bug or have a question,
You can contribute by using Pomsky and providing feedback. If you find a bug or have a question,
please create an issue.

I also gladly accept code contributions. To make sure that CI succeeds, please run `cargo fmt`,
Expand Down
4 changes: 2 additions & 2 deletions benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rulex = { version = "0.4.3", path = "../rulex-lib" }
pomsky = { version = "0.5.0", path = "../pomsky-lib" }
criterion = { git = "https://github.com/bheisler/criterion.rs", branch = "version-0.4" }

[[bench]]
# run benchmarks with `cargo criterion -p rulex`
# run benchmarks with `cargo criterion -p pomsky`
name = "main"
harness = false
Loading

0 comments on commit 442ae42

Please sign in to comment.