From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA30110 for caml-redistribution; Fri, 15 Oct 1999 08:49:59 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA26411 for ; Fri, 15 Oct 1999 00:44:45 +0200 (MET DST) Received: from ruby (pm1-25.triode.net.au [203.63.235.41]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id AAA08400 for ; Fri, 15 Oct 1999 00:44:40 +0200 (MET DST) Received: from maxtal.com.au (IDENT:root@localhost [127.0.0.1]) by ruby (8.9.3/8.9.3) with ESMTP id IAA16837; Fri, 15 Oct 1999 08:38:29 +1000 Sender: weis Message-ID: <38065B65.4BE00CC3@maxtal.com.au> Date: Fri, 15 Oct 1999 08:38:29 +1000 From: skaller Organization: Maxtal X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: Juergen Pfitzenmaier CC: caml-list@inria.fr Subject: Re: Quotes inside a comment ? References: <199910131230.OAA15829@sunstroke.informatik.uni-tuebingen.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Juergen Pfitzenmaier wrote: > > The documentation says even inside comments the quotes (that's -- " --) > have to be used pairwise. Is there any reason for this ? Yes. it is to allow " ... (* ... " as a string in ocaml code, which can be itself wrapped correctly in (* .. code .. *) comments, to hide the code. That is, it is a 'hack' to allow comments to be used for conditional compilation as well as documentation. > I would like to have a good documentation for the code I write and my > preferred way is to use nuweb and put some TeX right beside the piece > of code it refers to. > But sometimes I have to use a non-english language > for the comments and then I need special characters that are constructed > with a -- " -- in front of them. The only way to use these comments > with ocaml is to filter all comments out before compiling. This is no > big deal but it is not nice and easy. Is there any change in sight ? One solution is to use Interscript as a literate programming tool, instead of nuweb. See http://www.triode.net.au/~skaller/interscript Interscript understands utf-8, and also permits other inputs including latin-1. The correct way to support extended characters is to use \uXXXX and \uXXXXXXXX escapes. You can also switch to Omega/Lambda as a typesetter (Omega is a unicode version of TeX, Lambda is the corresponding LaTeX). Because Interscript is an extension of the powerful Python scripting language, you can program custom documentation extraction for embedded comments, thus side-stepping any problems with ocaml comments. You can also implement conditional compilation that way. -- John Skaller, mailto:skaller@maxtal.com.au 1/10 Toxteth Rd Glebe NSW 2037 Australia homepage: http://www.maxtal.com.au/~skaller downloads: http://www.triode.net.au/~skaller