From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Cc: Ingo Schwarze <schwarze@usta.de>
Subject: Re: [PATCH] uniform parsing of names in libroff
Date: Tue, 11 Jan 2011 00:10:18 +0100 [thread overview]
Message-ID: <4D2B91DA.3000607@bsd.lv> (raw)
In-Reply-To: <20110110225213.GA4964@iris.usta.de>
On 10/01/2011 23:52, Ingo Schwarze wrote:
> Hi,
>
> i just started to implement .rm (remove macro) in libroff,
> then realized that i would be introducing the third place
> where names (that is, to be precise, roff macro and string names)
> get parsed.
>
> The following patch moves this parsing into its own function,
> to be soon reused by roff_rm().
>
> I put that function roff_getname() in libroff (and not in
> libmandoc) because i do not expect any macro package to deal
> with that kind of low-level stuff.
>
> The interface is similar to mandoc_getarg(), but much simpler,
> because quotes count as normal characters in this context,
> space characters cannot be escaped, and backslashes are only
> allowed in pairs. Yes, parsing of names has its own rules,
> and they are quite different from the rules for parsing of
> arguments. See, this is roff, right?
>
> As a bonus:
> - Both roff_ds and roff_nr become much shorter.
> - We get an ERROR when there are escapes in a name.
>
> OK?
Ingo, I'm fine with this.
Let me know when your changes into libroff are finished---I want to hash
setstr() stuff, as there are a lot of pod2man and man pages with lots of
requests, and we can probably make a measurably impact on performance.
Thanks,
Kristaps
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
next prev parent reply other threads:[~2011-01-10 23:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 22:52 Ingo Schwarze
2011-01-10 23:10 ` Kristaps Dzonsons [this message]
2011-01-10 23:41 ` [PATCH] implement .rm Ingo Schwarze
2011-01-10 23:47 ` Kristaps Dzonsons
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=4D2B91DA.3000607@bsd.lv \
--to=kristaps@bsd.lv \
--cc=schwarze@usta.de \
--cc=tech@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).