-- File: WalnutParse.mesa

-- Contents: Types for Parsing messages
-- Last edit by:
-- Rick on: xxx
-- Willie-Sue on: April 18, 1983 10:29 am

DIRECTORY
Rope;

WalnutParse: CEDAR DEFINITIONS =

BEGIN

-- Global types

ROPE: TYPE = Rope.ROPE;

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};

-- handy procedures
-- from WalnutSendMailImpl

CanonicalName: PROC[simpleName, registry: ROPE] RETURNS[name: ROPE];

END.