This probably qualifies to be a FAQ on this list. I have bumped into similar (but not same) problems in the past, and IIRC then I was asked to refer to some historical discussions around this. There are some well documented & deterministic way of converting the MACRO based specification to IOC based specification, in one of the 2 great books on ASN.1 ! Searching on the list might help. - banibrata dutta.
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ramaswamy Ranganathan Sent: Monday, February 26, 2007 3:41 PM To: [email protected] Subject: [Asn1] Trouble Compiling MACRO Usage Hi, I am well aware that MACRO's in ASN.1 have long been depricated and InformationObjects have been recommended in place. I have thus far only come across ASN.1 specifications using Information Objects. I bumped into a MAP specification (3GPP TS 29.002 V3.20.0) using the MACRO but couldn't get to compile it. For quick ref this is how "TCAPMessages { ccitt recommendation q 773 modules (2) messages (1) version2 (2) }" defines the OPERATION Macro - ________________________________ -- Operations are specified with the OPERATION MACRO. -- When an operation is specified, the valid parameter set, results, and errors for that operation are indicated. -- Default values and optional parameters are permitted. OPERATION MACRO ::= BEGIN TYPE NOTATION ::= Parameter Result Errors LinkedOperations VALUE NOTATION ::= value (VALUE CHOICE { localValue INTEGER, globalValue OBJECT IDENTIFIER } ) Parameter ::= ArgKeyword NamedType | empty ArgKeyword ::= "ARGUMENT" | "PARAMETER" Result ::= "RESULT" ResultType | empty Errors ::= "ERRORS" "{"ErrorNames"}" | empty LinkedOperations ::= "LINKED" "{"LinkedOperationNames"}" | empty ResultType ::= NamedType | empty ErrorNames ::= ErrorList | empty ErrorList ::= Error | ErrorList "," Error Error ::= value (ERROR) -- shall reference an error value | type -- shall reference an error type -- if no error value is specified LinkedOperationNames ::= OperationList | empty OperationList ::= Operation | OperationList "," Operation Operation ::= value (OPERATION) -- shall reference an operation value | type -- shall reference an operation type if -- no operation value is specified NamedType ::= identifier type | type END ________________________________ And this is the usage of the MACRO that the compiler refuses give a green signal for :( ________________________________ SendRoutingInfo ::= OPERATION --Timer m -- The timer is set to the upper limit of the range if the GMSC supports pre-paging. ARGUMENT sendRoutingInfoArg SendRoutingInfoArg RESULT sendRoutingInfoRes SendRoutingInfoRes ERRORS { SystemFailure, DataMissing, UnexpectedDataValue, FacilityNotSupported, OR-NotAllowed, UnknownSubscriber, NumberChanged, BearerServiceNotProvisioned, TeleserviceNotProvisioned, AbsentSubscriber, BusySubscriber, NoSubscriberReply, CallBarred, CUG-Reject, ForwardingViolation} ________________________________ The compiler complaints that 'sendRoutingInfoArg' is an unexpected token. I am suspecting that the usage is correct and this is plausibly given to the incapacity of the compiler to interpret this. Any advise in this regard would be greatly appreciated. Cheerios Ramaswamy -- "Chaos is the rule in nature, not an exception" http://ramaswamy.r.googlepages.com
_______________________________________________ Asn1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
