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::lastpos {cs lastpos nullable} {
switch -- $cs {
:seq {
set result [lindex $lastpos end 1]
for {set i [expr {[llength $nullable] - 1}]} {$i >= 0} {incr i -1} {
if {[lindex $nullable $i 1]} {
lappend result {*}[lindex $lastpos $i 1]
} else {
break
}
}
}
:choice {
foreach child $lastpos {
lappend result {*}$child
}
}
}
return [list $lastpos [makeSet $result]]
}