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?