Next and Previous symbols are defined based on the current state of the structure, with NextSymbol as
The procedure runs in the appropriate direction down from one symbol to another to the lowest level where there is a join to a rising link, and then runs up again as far as necessary, with PARSE operators and BeginSentence and EndSentence as special cases. (Each red arrow in the diagram points from one symbol to its "next symbol").
This method of finding the next and previous symbol allows structure to be built anywhere to any height and still be recognised as adjacent by the BRIDGE operator.
Some symbols "cover" what is below them, some do not, with the ones that do linked to CoverSymbol, so the need for different handling at the PARSE operators can be recognised. An example is the Body of a NounPhrase - it covers its components, so the only symbols needed are StartNounPhrase, BodyNounPhrase, EndNounPhrase.
NextSymbol behaves differently if it is finding the first or last symbol for a STRUCTURE1 pattern. In those cases, it returns the set of symbols as it climbs, allowing the new structure to attach itself anywhere "up the hill". This avoids problems with phasing, where structure has been built on the other side of the symbol required to complete the pattern. If we have structures growing on either side of a central point, the difficulty compared with a single structure is obvious.
Here, climbing to the top works each time. But for two structures next to each other
The NextSymbol function is unaware of the cutting and healing or symbol insertion that occurs during parsing - it operates on the structure as it finds it.