File: PeanutParse.mesa
DIRECTORY
GVMailParse USING [NameInfo],
Rope;
PeanutParse: CEDAR DEFINITIONS =
BEGIN
Global types
ROPE: TYPE = Rope.ROPE;
Name: TYPE = REF NameRecord;
NameRecord:
TYPE =
RECORD [simpleName, registry, arpaHost:
ROPE←
NIL];
Qualification: TYPE = {unqualified, dotQualified, arpaQualified};
MessageFieldIndex:
TYPE = {
-- order is significant
replyToF, senderF, fromF, toF, ccF, cF, bccF, dateF, subjectF, categoriesF, inReplyToF};
MessageFType: TYPE = {simpleRope, rCatList, rNameList};
MessageInfo: TYPE = RECORD[name: ROPE, fType: MessageFType];
messageParseArray: ARRAY MessageFieldIndex OF MessageInfo;
ParseStatus: TYPE = {ok, syntaxError};
CanonicalizeName: PROC[r: ROPE] RETURNS[name: ROPE];
CanonicalName:
PROC[simpleName, registry, arpaHost:
ROPE, n: GVMailParse.NameInfo, sending:
BOOL]
RETURNS[name: ROPE, arpaSeen: BOOL];
LocalArpaSite: PROC[host: ROPE] RETURNS [BOOL];
END.