quoted_string_parser/lib.rs
1//! This crates implements a parser for text that meets the grammar for
2//! "quoted-string" as described in *SIP: Session Initiation Protocol*.
3//! [RFC3261](https://www.rfc-editor.org/rfc/rfc3261)
4//!
5//!```text
6//! quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
7//! qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII
8//! quoted-pair = "\" (%x00-09 / %x0B-0C / %x0E-7F)
9//! LWS = [*WSP CRLF] 1*WSP ; linear whitespace
10//! SWS = [LWS] ; sep whitespace
11//! UTF8-NONASCII = %xC0-DF 1UTF8-CONT
12//! / %xE0-EF 2UTF8-CONT
13//! / %xF0-F7 3UTF8-CONT
14//! / %xF8-Fb 4UTF8-CONT
15//! / %xFC-FD 5UTF8-CONT
16//! UTF8-CONT = %x80-BF
17//! DQUOTE = %x22 ; " (Double Quote)
18//! CRLF = CR LF ; Internet standard newline
19//! CR = %x0D ; carriage return
20//! LF = %x0A ; linefeed
21//! WSP = SP / HTAB ; whitespace
22//! SP = %x20
23//! HTAB = %x09 ; horizontal tab
24//!```
25
26#![deny(missing_docs)]
27
28extern crate pest;
29#[macro_use]
30extern crate pest_derive;
31
32mod parser;
33
34pub use crate::parser::QuotedStringParseLevel;
35pub use crate::parser::QuotedStringParser;