Typed tree representation:
type color = Red | Green | Blue | Cyan | Magenta | Yellow | Black | White | Unspecified
and size = T0 | T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | Tnone
and prop =
{mutable b:bool;
mutable em:bool;
mutable i:bool;
mutable s:bool;
mutable tt:bool;
mutable u:int;
mutable size:size;
mutable color:color}
type tdoc = { mutable expr : tdoc_expr ; mutable prop :prop }
and tdoc_expr =
Ttag_B of tdoc
| Ttag_EM of tdoc
| Ttag_I of tdoc
| Ttag_PL of tdoc
| Ttag_S of tdoc
| Ttag_TT of tdoc
| Ttag_U of tdoc
| Ttag_color of tdoc * color
| Ttag_size of tdoc * size
| TList of tdoc list
| TString of string