
-- OK: Everything is fine

-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .158

ModuleMultipleParameterizedInstance
    { iso org(3) dod(6) internet(1) private(4) enterprise(1)
        spelio(9363) software(1) asn1c(5) test(1) 158 }
DEFINITIONS ::= BEGIN

    MYID ::= CLASS {
        &id     INTEGER UNIQUE,
        &Type
    } WITH SYNTAX {&Type IDENTIFIED BY &id}

    TotalRegionExtension MYID ::= {
        RegionalExtension1 |
        RegionalExtension2
    }

    RegionalExtension1 MYID ::= {
        {INTEGER IDENTIFIED BY 1} |
        {BOOLEAN IDENTIFIED BY 2},
        ...,
        {OCTET STRING IDENTIFIED BY 3}
    }

    RegionalExtension2 MYID ::= {
        {INTEGER IDENTIFIED BY 1},
        ...,
        {BOOLEAN IDENTIFIED BY 2} |
        {OCTET STRING IDENTIFIED BY 3}
    }

    RegionalExtension3 MYID ::= {
        {OCTET STRING IDENTIFIED BY 1} |
        {OCTET STRING IDENTIFIED BY 4},
        ...
    }

    RegionalExtension4 MYID ::= {
        {INTEGER IDENTIFIED BY 5},
        ...,
        {OCTET STRING (5) IDENTIFIED BY 6}
    }

    Message1 ::= SEQUENCE {
        content SpecializedContent {{TotalRegionExtension}}
    }

    Message2 ::= SEQUENCE {
        content SpecializedContent {{RegionalExtension3}}
    }

    Message3 ::= SEQUENCE {
        content SpecializedContent {{RegionalExtension4}}
    }

    SpecializedContent {MYID : Set} ::= SEQUENCE {
        id      MYID.&id({Set}),
        value   MYID.&Type({Set}{@id})
    }

END
