groff
[Top][All Lists]
Advanced

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

Re: [Groff] parsing a corner specification


From: Dwight Aplevich
Subject: Re: [Groff] parsing a corner specification
Date: Sun, 19 Aug 2007 18:59:06 -0400

Hello

If it helps, you are correct.  The dpic compass-corner
definitions are given in the documentation.  The "upper"
and "lower" keywords are not defined. I can only suggest
that instead of writing

B: A upper left

write

B: A.nw

which will work both for gpic and dpic.

DA

At 04:41 PM 19/08/2007, Joel E. Denny wrote:
On Sun, 19 Aug 2007, Werner LEMBERG wrote:

> > > I've searched the web and Open Group for some roff or pic
> > > standards document.  So far, I haven't found one.  Does one exist?
> >
> >     <http://plan9.bell-labs.com/cm/cs/cstr/116.ps.gz>
>
> Search for `pic.ps' (made from `pic.ms') in case you have groff
> installed.  This documentation contains a complete annotated grammar.

Thanks.  It looks like both grammars exclude some constructs accepted by
GNU pic.  For example:

  B: A

and:

  B: A upper left

> Note that GNU pic tries to be compatible with the AT&T pic; this
> probably explains some of the strange grammar constructs

How can I obtain a copy of AT&T pic?  This page makes it seem as if I
won't have much luck:

  http://troff.org/source.html

It links to Plan 9, which has pic source here:

  http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/pic/

Its lexer returns left as a CORNER token only when preceded by "." or
followed by "of", so it can't be the inspiration for the GNU pic behavior
I'm observing.

The Heirloom project has similar source and its lexer does the same thing:

  http://heirloom.cvs.sourceforge.net/heirloom/heirloom-doctools/pic/

> On the other hand, you might also test with `dpic', which also
> documents various differences of GNU pic, dpic, and the original AT&T
> pic.

Thanks.  In their list of differences, the most relevant item I found was
this:

  compass corners:
    dpic consistently requires a dot before compass corners, so the gpic
  line
      "x" at center of last box
    should be written for dpic as
      "x" at .center of last box

So, dpic accepts neither of my original examples:

  B: A upper left
  B: A left

As far as I can tell, dpic does not recognize the "upper" keyword.  The
second example must be changed to the following to be accepted by dpic:

  B: A.left

This is also accepted by GNU pic without switching to canonical LR(1).

I'm getting the strong impression that I'm looking at a very obscure usage
of GNU pic.  Would you agree?

Dwight Aplevich




reply via email to

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