Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sabitheotome authored Oct 18, 2024
1 parent 1d1dbfb commit a0ca19e
Showing 1 changed file with 43 additions and 2 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,49 @@
[actions-badge]: https://github.com/sabitheotome/lavan/workflows/CI/badge.svg
[actions-url]: https://github.com/sabitheotome/lavan/actions

*Lavan is a mean, lean, parsing machine!*
### *Lavan is a mean, lean, parsing machine!*
A library for empowering users to build concise parsers, either for domain-specific, or general-purpose languages.

> [!WARNING]
> This project is currently experimental. Literally, everything is subject to changes, even the repository link and the license. We STRONGLY ADVISE you to NOT USE this library in production.
> ## This project is currently experimental. Literally, everything is subject to changes, even the repository link and the license.
>
> ## We STRONGLY ADVISE you to NOT USE this library in production.
# Example

## Parsing an email address

```rust
#![cfg(feature = "unstable_experiments_2021")]
use lavan::prelude::*;

fn main() {
let input = "es4fbero15181@r65dgh51.com";

let names_and_dots = any_if(char::is_ascii_alphanumeric)
.discard()
.repeat_min(1)
.repeat_min(1)
.separated_by(any_eq('.').discard())
.slice();

let email: Option<(&str, &str)> = names_and_dots
.as_ref()
.and(any_eq('@').discard())
.and(names_and_dots.as_ref())
.evaluate(input.chars());

let (username, hostname) = email.unwrap();
assert_eq!(username, "es4fbero15181");
assert_eq!(hostname, "r65dgh51.com");
}
```

# Release cycle

- We expect to launch v0.0.4-unstable in late December 2024. After that, monthly releases should roll out.
- Lavan will reach v0.1.0-unstable once it's 2024 rust edition migration is complete.
- After a solid and stable API, Lavan will reach 1.0.0-pre-alpha. Minor refactoring and optimizations will be prioritized.
- Once benchmarks are made and code is consolidated, we will reach 1-0-0-alpha.
- Once unofficially ready-to-production versions are ready, we reached 1-0-0-beta.
- After several unit tests, integration tests, benchmarks, and auditions, we will reach 1-0-0-rc.

0 comments on commit a0ca19e

Please sign in to comment.