+/*
+ * Indicates that a BODY's formatting has ended, but the scope is still
+ * open. Used for syntax-broken blocks.
+ */
+enum mdoc_endbody {
+ ENDBODY_NOT = 0,
+ ENDBODY_SPACE, /* is broken: append a space */
+ ENDBODY_NOSPACE /* is broken: don't append a space */
+};
+
+/*
+ * Normalised `Bl' list type.
+ */
+enum mdoc_list {
+ LIST__NONE = 0,
+ LIST_bullet,
+ LIST_column,
+ LIST_dash,
+ LIST_diag,
+ LIST_enum,
+ LIST_hang,
+ LIST_hyphen,
+ LIST_inset,
+ LIST_item,
+ LIST_ohang,
+ LIST_tag,
+ LIST_MAX
+};
+
+/*
+ * Normalised `Bd' display type.
+ */
+enum mdoc_disp {
+ DISP__NONE = 0,
+ DISP_centred,
+ DISP_ragged,
+ DISP_unfilled,
+ DISP_filled,
+ DISP_literal
+};
+
+/*
+ * Normalised `An' splitting argument.
+ */
+enum mdoc_auth {
+ AUTH__NONE = 0,
+ AUTH_split,
+ AUTH_nosplit
+};
+
+/*
+ * Normalised `Bf' font type.
+ */
+enum mdoc_font {
+ FONT__NONE = 0,
+ FONT_Em,
+ FONT_Li,
+ FONT_Sy
+};
+
+/*
+ * Normalised arguments for `Bd'.
+ */
+struct mdoc_bd {
+ const char *offs; /* -offset */
+ enum mdoc_disp type; /* -ragged, etc. */
+ int comp; /* -compact */
+};
+
+/*
+ * Normalised arguments for `Bl'.
+ */
+struct mdoc_bl {
+ const char *width; /* -width */
+ const char *offs; /* -offset */
+ enum mdoc_list type; /* -tag, -enum, etc. */
+ int comp; /* -compact */
+ size_t ncols; /* -column arg count */
+ const char **cols; /* -column val ptr */
+};
+
+/*
+ * Normalised arguments for `Bf'.
+ */
+struct mdoc_bf {
+ enum mdoc_font font; /* font */
+};
+
+/*
+ * Normalised arguments for `An'.
+ */
+struct mdoc_an {
+ enum mdoc_auth auth; /* -split, etc. */
+};
+
+struct mdoc_rs {
+ int quote_T; /* whether to quote %T */
+};
+
+/*
+ * Consists of normalised node arguments. These should be used instead
+ * of iterating through the mdoc_arg pointers of a node: defaults are
+ * provided, etc.
+ */
+union mdoc_data {
+ struct mdoc_an An;
+ struct mdoc_bd Bd;
+ struct mdoc_bf Bf;
+ struct mdoc_bl Bl;
+ struct mdoc_rs Rs;
+};
+
+/*
+ * Single node in tree-linked AST.
+ */