Depend on my forked version of pest

This commit is contained in:
Michael Zhang 2021-03-02 00:15:12 -06:00
parent 50128cd10d
commit 1e6ecc45bb
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
3 changed files with 885 additions and 8 deletions

880
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -12,16 +12,14 @@ edition = "2018"
maintenance = { status = "passively-maintained" } maintenance = { status = "passively-maintained" }
[dependencies] [dependencies]
# nom = { version = "6.1.2", default-features = false, features = ["std"] }
# owning_ref = "0.4.1"
anyhow = "1.0.38" anyhow = "1.0.38"
async-trait = "0.1.42" async-trait = "0.1.42"
derive_builder = "0.9.0" derive_builder = "0.9.0"
futures = "0.3.12" futures = "0.3.12"
log = "0.4.14" log = "0.4.14"
parking_lot = "0.11.1" parking_lot = "0.11.1"
pest = { path = "../../pest/pest" } pest = { git = "https://github.com/iptq/pest", rev = "838adc941cc182e2c2d807e245a1e4c3e8594036" }
pest_derive = { path = "../../pest/derive" } pest_derive = { git = "https://github.com/iptq/pest", rev = "838adc941cc182e2c2d807e245a1e4c3e8594036" }
tokio = { version = "1.1.1", features = ["full"] } tokio = { version = "1.1.1", features = ["full"] }
tokio-rustls = "0.22.0" tokio-rustls = "0.22.0"
tokio-stream = "0.1.3" tokio-stream = "0.1.3"

View file

@ -63,9 +63,6 @@ flag_perm = { flag | "\\*" }
header_fld_name = { astring } header_fld_name = { astring }
header_list = { "(" ~ header_fld_name ~ (sp ~ header_fld_name)* ~ ")" } header_list = { "(" ~ header_fld_name ~ (sp ~ header_fld_name)* ~ ")" }
list_wildcards = @{ "%" | "*" } list_wildcards = @{ "%" | "*" }
// literal = @{ "{" ~ number ~ "}" ~ crlf ~ literal_str }
literal = { #crate::parser::literal_internal }
literal_str = { #crate::parser::literal::noop }
mailbox = { ^"INBOX" | astring } mailbox = { ^"INBOX" | astring }
mailbox_data = { mailbox_data_flags | mailbox_data_list | (^"LSUB" ~ sp ~ mailbox_list) | (^"SEARCH" ~ (sp ~ nz_number)*) | (^"STATUS" ~ sp ~ mailbox ~ sp ~ ^"(" ~ status_att_list? ~ ^")") | mailbox_data_exists | mailbox_data_recent } mailbox_data = { mailbox_data_flags | mailbox_data_list | (^"LSUB" ~ sp ~ mailbox_list) | (^"SEARCH" ~ (sp ~ nz_number)*) | (^"STATUS" ~ sp ~ mailbox ~ sp ~ ^"(" ~ status_att_list? ~ ^")") | mailbox_data_exists | mailbox_data_recent }
mailbox_data_exists = { number ~ sp ~ ^"EXISTS" } mailbox_data_exists = { number ~ sp ~ ^"EXISTS" }
@ -134,6 +131,10 @@ time = @{ digit{2} ~ ":" ~ digit{2} ~ ":" ~ digit{2} }
uniqueid = { nz_number } uniqueid = { nz_number }
zone = @{ ("+" | "-") ~ digit{4} } zone = @{ ("+" | "-") ~ digit{4} }
// custom-implemented functions
literal = { #crate::parser::literal_internal }
literal_str = { #crate::parser::literal::noop }
// core rules from https://tools.ietf.org/html/rfc2234#section-6.1 // core rules from https://tools.ietf.org/html/rfc2234#section-6.1
alpha = @{ '\x41'..'\x5a' | '\x61'..'\x7a' } alpha = @{ '\x41'..'\x5a' | '\x61'..'\x7a' }
char = @{ '\x01'..'\x7f' } char = @{ '\x01'..'\x7f' }