discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: discuss@mdocml.bsd.lv
Subject: mandoc(3) re-write update: mdoc(7) parsing w/badblocks
Date: Fri, 14 Sep 2012 01:51:35 +0300	[thread overview]
Message-ID: <50526377.5070706@bsd.lv> (raw)

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

Hello,

Enclosed is an update to my experimental mandoc(3) rewrite.  Again, note 
"experimental".  However, this has a nice feature: it supports arbitrary 
bad-block nesting in mdoc(7) in fairly few lines.

  .Ao
  .Aq foo Ac bar

  .Aq foo Ao
  bar
  .Ac

  .Aq Oo Ao Oc Ac

The first example has Ao interrupted by the Ac within an Aq; the second 
has the scope of Aq extended by Ao (with Aq and Ao/Ac, the output is as 
the input reads, but with It within, say, a -tag list, the scope of It 
will be extended); and in the third, the scopes of Oo and Ao overlap.

Since the macro handlers are recursive, it's pretty easy to pull this 
off, as you can see.

Best,

Kristaps

[-- Attachment #2: mdocml2.tar.gz --]
[-- Type: application/x-gzip, Size: 27054 bytes --]

                 reply	other threads:[~2012-09-13 22:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50526377.5070706@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=discuss@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).