next up previous
Next: 3.2.1 Prototype Operator TypeSpec Up: 3. MP Type Specifications Previous: 3.1 Basic type specifications

   
3.2 Operator type specifications

The most simple of prototypes consist of a single Basic TypeSpec, as in figure 1. To specify the type of composite data such as structures, union, or arrays of structs or unions, (meta) operators must appear within the prototype tree. Syntactically, we define:

<<Operator TypeSpec> ::= 		  <Prototype Operator TypeSpec>|<Meta Operator TypeSpec><Prototype Operator TypeSpec> ::= 		Cop:Proto::Struct:n<MP TypeSpec>n| Cop:Proto::RecStruct:n<MP TypeSpec>n| Cop:Proto::Union:n<MP TypeSpec>n| Cop:Proto::RecUnion:n<MP TypeSpec>n<Meta Operator TypeSpec> ::= 		 Mop:Any::Any<Prototype AP>| Cmop:Any::Any<Prototype AP> 
where the index n to <MP TypeSpec> specifies n arguments, each a prototype tree. The structuring operators MP_CopProtoStruct, MP_CopProtoRecStruct, MP_CopProtoUnion, and MP_CopProtoRecUnion used in Prototype Operator TypeSpecs are defined in the prototype dictionary (MP_ProtoDict). These are the only operators which may appear in a syntactically valid prototype tree. That is, a valid prototype may only consist of (common) meta operators, (common) meta types, and these four common operators (in addition to annotation packets attached to these nodes). In particular, other operators defined in the prototype dictionary, such as Cop:Proto::Array (MP_CopProtoArray) or Cop:Proto::Pointer (MP_CopProtoPointer), are only provided as convenient means for mapping data structures to prototyped data trees and play no special role within prototype trees.



 
next up previous
Next: 3.2.1 Prototype Operator TypeSpec Up: 3. MP Type Specifications Previous: 3.1 Basic type specifications
| ZCA Home | Reports |