#sieve #parser #language #ast #exporter #build

bin+lib sieve-parser

Parsing the Sieve language and exporting an abstract representation

2 releases

0.1.2 Oct 20, 2023
0.1.1 Oct 19, 2023

#173 in Email

AGPL-3.0-or-later

46KB
1K SLoC

Rust 856 SLoC // 0.2% comments Pest 177 SLoC // 0.4% comments Shell 73 SLoC // 0.2% comments

Sieve Parser

build crates.io docs.rs License: AGPL v3

Sieve Parser is a fast parser and AST exporter implemented in Rust for the Sieve language.

Quick start for development

Read and follow the instructions in Developing inside a Container.

Build

make build

Usage (CLI)

With -f|--file argument:

sieve-parser --file resources/assets/tricky-rule1.sieve

With stdin:

cat resources/assets/tricky-rule1.sieve | sieve-parser

or sieve-parser < resources/assets/tricky-rule1.sieve

Testing

cargo test

License

Sieve Parser is distributed under AGPL-3.0-only.

Dependencies

~2.6–4MB
~79K SLoC