Retrieve the Local Options for a Cell

<..HTable..>+
 \def\TD:cell{\gHAdvance\HCol by 1   \futurelet\:temp\TD:cll }
 \def\TD:cll{%
    \ifx [\:temp  \let\:temp=\T:D
    \else  \expandafter\ifx\space\:temp
       \expand:after{\def\:temp}\space{\futurelet\:temp\TD:cll}\else
       \tbl:ch
    \fi \fi \:temp}
 -_-_-

<..HTable..>+
 \catcode‘\^=13  \catcode‘\_=13
 \def\tbl:ch{{\def^{\string^}\def_{\string_}%
        \xdef\:temp{\noexpand\T:D[\:HTbleAtt]}}}
 \catcode‘\^=7  \catcode‘\_=8
 -_-_-

<..HTable..>+
 \def\insert:TD{\futurelet\:tempc\TD:}
 
 \def\TD:{%
    \ifx \par\:tempc \def\:temp\par{\insert:TD}\go:out\:temp\fi
    \expandafter\ifx \space\:tempc
           \expand:after{\def\:temp}\space{\insert:TD}%
                                 \go:out\:temp      \fi
    \ifx \EndH:Table\:tempc     \go:out\empty\fi
    \gHAdvance\HCol by 1    \chk:tblop   \tbl:ch \go:out\:temp\empty
    \:out}
 
 \def\chk:tblop{\ifx [\:tempc \go:out\T:D  \fi}
 -_-_-

We want the rectangles ‘[...’ at halign tables to be part of the entries.

<..no check for [...] in HTable..>
 \let\chk:tblop=\empty
 -_-_-

<..HTable..>+
 \def\T:D[{\def\TD:typ{td}\let\TD:more=\empty \scan:TD}
 \def\scan:TD#1{%
    \ifx ]#1\e:HTable
       \go:out\:HTableScript  \fi
    \ifx /#1\def\:temp##1]{\edef\TD:more{\TD:more\space##1}\scan:TD]}%
           \go:out\:temp  \fi
    \ifx H#1\def\TD:typ{th}\go:out\scan:TD\fi
    \ifx R#1\SP:N{rowspan}\fi
    \ifx C#1\SP:N{colspan}\fi
    \al:gn\TD:more#1%
    \go:out\scan:TD\empty\:out   }
 
 \def\SP:N#1{%
    \def\:temp{\edef\TD:more{ #1="\the\tmp:cnt"\TD:more
                  \Hnewline}\scan:TD}%
    \def\:tempa##1{\afterassignment\:temp \tmp:cnt=##1}%
    \go:out\:tempa}
 -_-_-