From johan@ccs.neu.edu Fri Apr 6 14:17:55 2001 X-UIDL: b0aa4b1fccc9d2be11c8ce472a298a38 Return-Path: Received: from porrina.ccs.neu.edu (root@porrina.ccs.neu.edu [129.10.116.225]) by amber.ccs.neu.edu (8.10.0.Beta10/8.10.0.Beta10) with ESMTP id f36IHpf28848; Fri, 6 Apr 2001 14:17:51 -0400 (EDT) Received: from porrina.ccs.neu.edu (johan@localhost [127.0.0.1]) by porrina.ccs.neu.edu (8.10.0.Beta10/8.10.0.Beta10) with ESMTP id f36IHpU14601; Fri, 6 Apr 2001 14:17:51 -0400 (EDT) Message-Id: <200104061817.f36IHpU14601@porrina.ccs.neu.edu> X-page-me-by: putting the word URGENT in the subject X-pgp-key-url: http://www.ccs.neu.edu/home/johan/pgpkey X-pgp-fingerprint: B9 EF F6 16 B0 FA 1F 48 CE 37 37 9B A3 8F 7A B5 To: lieber@ccs.neu.edu, patrikj@cs.chalmers.se, wupc@ccs.neu.edu From: Johan Ovlinger Subject: collab.cd Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Date: Fri, 06 Apr 2001 14:17:50 -0400 Sender: johan@ccs.neu.edu Status: RO X-Status: X-Keywords: X-UID: 23 I took the opportunity to create a CD file fresh from our discussions yesterday. It is uncompiled, thus may contain errors, and is clearly incomplete (hence the FIXME terminals), but I think is close to where we are aiming. It will accept a larger language than it should, but I think that is easier to check after parsing. Note that this is meant to be for the core syntax, so it is simple. It doesn't look like I'll have much more time this PM to work on it, so for your reading pleasure: /* This is a cd file to describe collaborations */ AC = "collaboration" CollabName SimpleOrComposite. SimpleOrComposite = Simple | Composite. Simple = BracedList(ParticipantOrClassDef). Composite = "adapts" CollabName List(AdapterDef). ParticipantOrClassDef : ParticipantDef | ClassDef common CommonBits. ClassDef = "class" . ParticipantDef = "participant" . // CommonBits is what looks just like an extended class def. We need // to decide whether classes are different from participants with no // exected or aspectual member. CommonBits = "FIXME". AdapterDef = "adapt" CommaList(CollabName) Attachments. Attachments = BracedList(Attachment). Attachment : For | CompleteAttachment. For = "for" VarTup "in" PatTup Attachments. // vars and pats must be same length CompleteAttachment = "attachment" BracedList(PartMap). PartMap = PartSpec "+=" CommaList(PartSpec) [With]. With = "with" BracedList(MemberMap). MemberMap : Wraps | Provides | Exports. Wraps = MemSpec "wraps" MemSpec. // check at runtime only used w/ methods Provides = MemSpec "=" MemSpec. Exports = "export" MemSpec "as" MemSpec. VarTup = "FIXME". PatTup = "FIXME". // Specs PartSpec = VarOrVerb. MemSpec = TypeSpec NameSpec [ArgsSpec]. TypeSpec = VarOrVerb. NameSpec ~ VarOrVerb {VarOrVerb}. ArgsSpec = "(" CommaList(VarOrVerb) ")". VarOrVerb = Var | Verb. Var = "<" VarName ">". Verb = Ident. // These need to include verbatim names/signaures, var names, and // generated name/sigs I'm thinking it's probably less hassle to only // parse memspecs and then use wellformedness check to make sure no // variable is being wrapped. VarName = Ident. List(P) ~ { P }. CommaList(P) = [ NCommaList(P) ]. NCommaList(P) ~ P {"," P}. BracedList(P) = "{" List(P) "}".