diff --git a/src/GenericParser/RFC5322.purs b/src/GenericParser/RFC5322.purs index 2c3f5a3..6d47eee 100644 --- a/src/GenericParser/RFC5322.purs +++ b/src/GenericParser/RFC5322.purs @@ -1,6 +1,6 @@ --- | `EmailAddress` is a parser for email addresses, implementing the grammar found in RFC5322. +-- | This module implements the email address grammar found in RFC5322. -- | --- | STATUS: the parser mostly works, except for comments. +-- | STATUS: the parser works except for comments. -- | Comments provoke a stack overflow, this must be investigated. -- | -- | Also, the parser needs a thorough review. @@ -171,7 +171,7 @@ group_list = mailbox_list <|> cfws <|> obs_group_list -- | Printable US-ASCII characters not including specials. -- | -- | atext = `ALPHA / DIGIT / "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" /` --- | `"-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~"` +-- | `"-" / "/" / "=" / "?" / "^" / "_" / backquote / "{" / "|" / "}" / "~"` atext :: forall e. Parser e Char atext = alphanum <|> char '!' <|> char '#' @@ -537,9 +537,11 @@ qcontent = CU.singleton <$> qtext <|> quoted_pair -- | -- | -- | Original RFC5322 rule: +-- | -- | quoted-string = `[CFWS] DQUOTE *([FWS] qcontent) [FWS] DQUOTE [CFWS]` -- | -- | Implemented rule: +-- | -- | quoted-string = `[CFWS] DQUOTE *([CRLF] qcontent) [FWS] DQUOTE [CFWS]` quoted_string :: forall e. Parser e String quoted_string = do s <- tryMaybe cfws