- case (MDOC_Bo):
- /* FALLTHROUGH */
- case (MDOC_Bro):
- /* FALLTHROUGH */
- case (MDOC_Do):
- /* FALLTHROUGH */
- case (MDOC_Eo):
- /* FALLTHROUGH */
- case (MDOC_Fo):
- /* FALLTHROUGH */
- case (MDOC_Oo):
- /* FALLTHROUGH */
- case (MDOC_Po):
- /* FALLTHROUGH */
- case (MDOC_Qo):
- /* FALLTHROUGH */
- case (MDOC_Rs):
- /* FALLTHROUGH */
- case (MDOC_So):
- /* FALLTHROUGH */
- case (MDOC_Xo):
- if (tok != p->tok)
- break;
- if (p->end)
- return(REWIND_HALT);
- if (type == p->type)
- return(REWIND_REWIND);
- break;
- /* Multi-line explicit scope close. */
- case (MDOC_Ac):
- /* FALLTHROUGH */
- case (MDOC_Bc):
- /* FALLTHROUGH */
- case (MDOC_Brc):
- /* FALLTHROUGH */
- case (MDOC_Dc):
- /* FALLTHROUGH */
- case (MDOC_Ec):
- /* FALLTHROUGH */
- case (MDOC_Ed):
- /* FALLTHROUGH */
- case (MDOC_Ek):
- /* FALLTHROUGH */
- case (MDOC_El):
- /* FALLTHROUGH */
- case (MDOC_Fc):
- /* FALLTHROUGH */
- case (MDOC_Ef):
- /* FALLTHROUGH */
- case (MDOC_Oc):
- /* FALLTHROUGH */
- case (MDOC_Pc):
- /* FALLTHROUGH */
- case (MDOC_Qc):
- /* FALLTHROUGH */
- case (MDOC_Re):
- /* FALLTHROUGH */
- case (MDOC_Sc):
- /* FALLTHROUGH */
- case (MDOC_Xc):
- if (rew_alt(tok) != p->tok)
- break;
- if (p->end)
- return(REWIND_HALT);
- if (type == p->type)
- return(REWIND_REWIND);
- break;
- default:
- abort();
- /* NOTREACHED */
- }
-
- return(REWIND_NOHALT);
-}
-
-
-/*
- * See if we can break an encountered scope (the rew_dohalt has returned
- * REWIND_NOHALT).
- */
-static int
-rew_dobreak(enum mdoct tok, const struct mdoc_node *p)
-{
-
- assert(MDOC_ROOT != p->type);
- if (MDOC_ELEM == p->type)
- return(1);
- if (MDOC_TEXT == p->type)
- return(1);
- if (MDOC_VALID & p->flags)
- return(1);
- if (MDOC_BODY == p->type && p->end)
- return(1);
-
- switch (tok) {
- case (MDOC_It):
- return(MDOC_It == p->tok);
- case (MDOC_Nd):
- return(MDOC_Nd == p->tok);
- case (MDOC_Ss):
- return(MDOC_Ss == p->tok);