The rules for the generation of CHOICE temporary type variables are the same as they were for SEQUENCE and SET variables. Complex nested types are pulled out of the definitions and used to create additional types to reduce the nesting levels. An example of this is as follows:
TestChoice ::= CHOICE { a INTEGER, b BOOLEAN, c SEQUENCE { aa IA5String, bb NULL } }
This would be reduced to the following equivalent ASN.1 productions:
TestChoice-c ::= SEQUENCE { aa IA5String, bb NULL } TestChoice ::= CHOICE { a INTEGER, b BOOLEAN, c TestChoice-c }
In this case, the embedded constructed element for option c was pulled out to form the TestChoice-c production and then this new production is referenced in the original definition.