From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-14 06:18:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: Eric Merritt Newsgroups: comp.lang.ada Subject: Re: Literate Programming [was: A case where ...] Date: Mon, 14 Jan 2002 06:17:27 -0800 (PST) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: avanie.enst.fr 1011017882 22735 137.194.161.2 (14 Jan 2002 14:18:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Mon, 14 Jan 2002 14:18:02 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: In-Reply-To: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:18900 Date: 2002-01-14T06:17:27-08:00 Nick, Not to be simplistic but isn't this just a multi-line comment? I realize that the purpose is to support literate programming but what you describe seems to be a multi-line comment line C's /**/. Of course, this does not mean to imply that the multi-line comments could not be parsed to extract content by a literate tool. That being said the syntax you describe could probably be a bit cleaner so that both those who want to use literate techniques and those who do not would be comfortable with it. --- Nick Roberts wrote: > What I think just be might be a worthwhile feature > to add to a future > revision would be some kind of line-oriented Ada > 'on/off switch'. > > This is best explained by an example. Suppose the > (new) standard defined a > line in source code, which contained just two > lexemes, the first === and the > second an identifier, as being a (say) 'mode > switch'. If the identifier is > ADA (ignoring case), the following text lines are > parsed as Ada source code, > up to the next mode switch or the end of the file. > If the identifier is > anything else, the following text lines are ignored, > up to the next mode > switch or the end of the file. > > A file could then contain e.g. > > > [begin snippet] > > > === docbook > > The next function returns the opposite > direction > to the one given as its parameter. > > === ada > > function Opposite (Way: in Direction) return > Direction; > > === docbook > > The next function ... > > > [end snippet] > > > This would mean that normal text files could be used > to contain mixed > content, including Ada source code, and yet any > standard Ada compiler could > directly compile such files. This would be a huge > advantage over having to > pre-process ('tangle') the files before compiling > them, which tends to > render the automatic 'make' tools supplied with Ada > systems useless. > > For the unfamiliar, the essence of 'literate > programming' (invented by the > heroic Prof. Don Knuth) is to combine software > documentation, in its own > suitable markup language (e.g. TeX or DocBook), with > the source code itself, > in the same source file. This simply means you can > neatly update both source > code and documentation at the same place, in the > same file, at the same > time. > > In the above example, with DocBook combined with > Ada, the file would be > pre-processed ('weaved') to produce pure DocBook, > which would then be > processed to be rendered on the screen (e.g. in a > web browser) or formatted > and printed. This pre-processing could be obviated > by making the mode > switches something like " proglang="Ada"> "]]>". > > It would be advantageous for the switches to be > defined by the standard, so > that all Ada compilers would recognize them. > > It would be a splendid opportunity to add a great > buzzword to Ada: we could > say it was a "literate programming language". Gotta > help with advocacy! > > -- > Best, > Nick Roberts > > > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/