Simple recursion example

Consider the following simplified version of the hierarchy as given
in Figure 1. The step references
refer to steps in the list in the section Recursion.
- Start with pattern P1. Call its associated builder (step 3). This creates node N1.
- All the patterns below P1 are processed, the first of which is P2.
- Call DFHTBSBP passing P2, N1, BUILDER parameters, and others:
- Using the passed pattern (now P2), call the builder. This creates node N2.
- Process all patterns below P2; there are no subpatterns, so steps 6 through 9 6 are not performed.
- Call the CONNECT entry of the builder, passing higher node N1 and the node just created, N2. This makes N1 point to N2.
- Return to caller.
- Get the next pattern, P3.
- Call DFHTBSBP passing P3, N1, BUILDER parameters, and others:
- Using the passed pattern (now P3), call the builder. This creates node N3.
- Process all patterns below P3; there are no subpatterns, so steps 6 through 9 6 are not performed.
- Call the CONNECT entry of the builder passing in higher node N1 and the node just created N3. This makes N1 point to N3.
- Return to caller.
- Last pattern processed (step 10).
- Call the builder associated with P1 to connect node N1 to HIGHERNODE. (This is zero because there is no higher node. Usually, a main builder’s CONNECT function either does nothing or adds the TCTTE name and address into the table management tables.)