--- /dev/null
+
+#include <list>
+
+#include "dom.hh"
+#include "globals.hh"
+#include "TNode.hh"
+#include "TToken.hh"
+
+void finishG(const TNode&);
+
+void
+do_bgroup(const TNode& cursor)
+{
+ TNode parent = cursor.parent();
+ if (parent.isM("matrix") || parent.isM("pmatrix") ||
+ parent.isM("bordermatrix") || parent.isM("cases"))
+ {
+ TNode row = cursor.create("row");
+ TNode cell = cursor.create("cell");
+ TNode g = cursor.createG();
+ row.append(cell);
+ cell.append(g);
+ g.append(cursor);
+ parent.append(row);
+ }
+ else
+ {
+ TNode g = cursor.createG();
+ cursor.replace(g);
+ g.append(cursor);
+ }
+}
+
+
+
+
+void
+do_apostrophe(const TNode& cursor)
+{
+}
+
+void
+do_control(const TNode& cursor, const std::string& name)
+{
+}
+
+void
+do_other(const TNode& cursor, const std::string& s)
+{
+ switch (s[0])
+ {
+ case '\'': do_apostrophe(cursor); break;
+ default:
+ if (isUnicodeDigit(s[0])) do_number(cursor, s);
+ else do_control(cursor, s);
+ }
+}
+
+void
+dispatch(const TNode& cursor, const TToken& token)
+{
+