groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [groff] Design and Implementation of *roff


From: Yves Cloutier
Subject: Re: [groff] Design and Implementation of *roff
Date: Fri, 30 Nov 2018 12:06:19 -0500

lol thanks for the kind words John. Lucky for you I just pulled the "Fool"
cart from my tarot deck.

I'm not interested in re-implementing troff, its syntax, or its grammar. I
am however interested in generating  troff output, without using troff.

High-level programming languages all compile down to assembly language. The
compiler writer's job is to convert syntax and semantics and generate the
corresponding assembly code. I see troff output as the assembly code, and
the troff commands as a programming language.

C, Pascal, C++ or whatever language are all different ways of generating
assembly code, they just have different syntax and semantics.

On Fri, Nov 30, 2018 at 11:13 AM John Gardner <address@hidden>
wrote:

> Insanity. Seriously.
>
> Reimplementing Troff is a task best not attempted at all. The grammar is
> horribly complex, the language riddled with cryptic, arcane features, and
> most importantly, it's not one program. It's several: the Troff pipeline
> involves preprocessors, postprocessors, and bundled macro packages, each of
> which have their own nuances and complications. You'd also be tasked with
> handling font metrics for device-specific output (PDF, terminal,
> PostScript, et al)...
>
> Normally I don't discourage people from trying their own implementations,
> but there are some things you just don't try: hand-rolling your own web
> browser, writing your own compiler infrastructure, or reimplementing
> complex, ancient typesetting systems like TeX or Troff.
>
> You need to be a special sort of crazy (and patient, and knowledgeable) to
> want to endure the obvious pains of reimplementing such a complex system.
>
> Here's the source code <https://github.com/Alhadis/otroff> for the
> original AT&T troff, BTW.
>
> — John
>
>
> On Sat, 1 Dec 2018 at 02:37, Yves Cloutier <address@hidden>
> wrote:
>
>> Hello,
>>
>> I'm in search of any documentation that provides insight into the design
>> and implementation of a *roff.
>>
>> I know source code exists for a few implementations like Plan 9, Heirloom,
>> Groff and Neatroff.
>>
>> However what I'm in search of is something a bit more high-level than
>> source code. Rather some design/implementation documentation that explains
>> an *approach* to implementing a *roff.
>>
>> Would anyone know if anything like this exists?
>>
>> My google searches how not come up with anything, and was just wondering
>> if
>> someone somewhere might have such documentation lying around in their
>> archives.
>>
>> regards,
>>
>> yc
>>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]