[plt-scheme] doc.txt syntax

From: Doug Orleans (dougo at place.org)
Date: Fri Oct 29 13:04:36 EDT 2004

Matthew Flatt writes:
 > At Thu, 28 Oct 2004 16:07:53 -0400, Doug Orleans wrote:
 > > I've noticed that library documentation in doc.txt files obeys a
 > > particular syntax.  [...] Is the syntax for this annotation language
 > > documented anywhere?
 > Yes. Search for "doc.txt" in Help Desk, or see "doc.txt" in the "help"
 > collection.

I already found that (I mentioned it in the [...] above) but it
doesn't say anything about the type/BNF annotations.  For example,
from that same file:

  > user-defined-doc-position : string -> (union number #f)

Or from collects/xml/doc.txt:

  > Xexpr = String
	  |  (cons Symbol (cons (listof (list Symbol String)) (listof Xexpr)))
	  |  (cons Symbol (listof Xexpr)) ;; an element with no attributes
	  |  Symbol ;; symbolic entities such as  
	  |  Number ;; numeric entities like 
	  |  Misc

I'm talking about the stuff after the `:' or `='.  Are these just
informal type specifications, or is this a formal language with a
defined syntax and semantics?  Or something in between?

--dougo at place.org

Posted on the users mailing list.