classnetColarEmail::HeadersParser

sys::Obj
  netColarEmail::HeadersParser

HeadersParser Parse the Mail headers (RFC 5322) Used by MsgParser

isDtext

Bool isDtext(Int c)

dtext %d33-90 / %d94-126

make

new make(MsgParser parser)

parser

MsgParser parser

readAddrSpec

MailNode readAddrSpec(InStream in)

addr-spec = local-part "@" domain

readAddress

MailNode readAddress(InStream in)

address         =   mailbox / group
readAddressList

MailNode readAddressList(InStream in)

Fandoc ERRORS:
Line 1 - Invalid *emphasis*

 address-list    =   (address *("," address)) / obs-addr-list

readAngleAddr

MailNode readAngleAddr(InStream in)

Fandoc ERRORS:
Line 1 - Invalid annotation []

[CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr

readBcc

MailNode readBcc(InStream in)

Fandoc ERRORS:
Line 1 - Invalid annotation []

bcc             =   "Bcc:" [address-list / CFWS] CRLF

readDateTime

MailNode readDateTime(InStream in)

readDisplayName

MailNode readDisplayName(InStream in)

display-name = phrase

readDomain

MailNode readDomain(InStream in)

domain = dot-atom / domain-literal / obs-domain

readDomainLiteral

MailNode readDomainLiteral(InStream in)

Fandoc ERRORS:
Line 1 - Invalid annotation []

domain-literal  =   [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS]

readDtext

MailNode readDtext(InStream in)

Read dText -> See isDtext()

readGroup

MailNode readGroup(InStream in)

Fandoc ERRORS:
Line 1 - Invalid annotation []

group           =   display-name ":" [group-list] ";" [CFWS]

readGroupList

MailNode readGroupList(InStream in)

group-list      =   mailbox-list / CFWS / obs-group-list
readHeader

MailNode readHeader(InStream in)

Read a single header Return an empty node if all headers already read (empty line) Note: Does consume the empty line -> Ready to start reading the body

readHeaders

MailNode readHeaders(InStream in)

Read all the headers (Until a blank line) Does consume the empty line at the end of the headers -> Ready to start reading the body

readIdLeft

MailNode readIdLeft(InStream in)

id-left = dot-atom-text / obs-id-left

readIdRight

MailNode readIdRight(InStream in)

id-right = dot-atom-text / no-fold-literal / obs-id-right

readKeywords

MailNode readKeywords(InStream in)

Fandoc ERRORS:
Line 1 - Invalid *emphasis*

keywords        =   "Keywords:" phrase *("," phrase) CRLF

readLocalPart

MailNode readLocalPart(InStream in)

local-part = dot-atom / quoted-string / obs-local-part

readMailbox

MailNode readMailbox(InStream in)

mailbox = name-addr / addr-spec

readMailboxList

MailNode readMailboxList(InStream in)

Fandoc ERRORS:
Line 2 - Invalid *emphasis*

// TODO: Message ID - section 3.6.4
(mailbox *("," mailbox)) / obs-mbox-list

readMsgId

MailNode readMsgId(InStream in)

msg-id          =   [CFWS] "<" id-left "@" id-right ">" [CFWS]
readMsgIds

MailNode readMsgIds(InStream in)

One or more message id's

readNameAddr

MailNode readNameAddr(InStream in)

Fandoc ERRORS:
Line 1 - Invalid annotation []

name-addr       =   [display-name] angle-addr

readNoFoldLiteral

MailNode readNoFoldLiteral(InStream in)

Fandoc ERRORS:
Line 1 - Invalid *emphasis*

"[" *dtext "]"