\valign had no handler. Add a preprocessing pass that finds \valign{...},
splits the group at \cr, treats each remaining \cr-separated line as one column
(entries split on &), and emits an equivalent tabular with the matrix
transposed; the existing capture then lays it out. Column alignment defaults to
left because the \valign preamble describes vertical alignment here.
A test transposes \valign{\cr a & b & c \cr d & e & f \cr} into two columns and
three rows, checking (a,d) and (c,f).