This procedure is defined in the server but not documented via ad_proc or proc_doc and may be intended as a private interface.

The procedure is defined as:

proc sgml::TraverseDepth1st {state t leaf nonTerm} {
    
    upvar #0 $state var

    set nullable {}
    set firstpos {}
    set lastpos {}

    switch -- [lindex $t 1 0] {
        :seq -
        :choice {
            set rep [lindex $t 0]
            set cs [lindex $t 1 0]

            foreach child [lrange [lindex $t 1] 1 end] {
                foreach {childNullable childFirstpos childLastpos}  [TraverseDepth1st $state $child $leaf $nonTerm] break
                lappend nullable $childNullable
                lappend firstpos $childFirstpos
                lappend lastpos  $childLastpos
            }

            eval $nonTerm
        }
        default {
            incr var(number)
            set rep [lindex $t 0 0]
            set name [lindex $t 1 0]
            eval $leaf
        }
    }

    return [list $nullable $firstpos $lastpos]

}

Show another procedure: