From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA20222; Tue, 22 Oct 2002 15:18:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 PAA20214 for ; Tue, 22 Oct 2002 15:18:54 +0200 (MET DST) Received: from cartoonia.phd.cs.unibo.it (phd.cs.unibo.it [130.136.6.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9MDIrD07212 for ; Tue, 22 Oct 2002 15:18:53 +0200 (MET DST) Received: from lordsoth.takhisis.org ([130.136.6.119]) by cartoonia.phd.cs.unibo.it (8.9.3/8.8.7) with ESMTP id PAA16157 for ; Tue, 22 Oct 2002 15:18:33 +0200 Received: from lordsoth.takhisis.org (lordsoth.takhisis.org [127.0.0.1]) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-7) with ESMTP id g9MDIcqC024068 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 22 Oct 2002 15:18:38 +0200 Received: (from zack@localhost) by lordsoth.takhisis.org (8.12.6/8.12.6/Debian-7) id g9MDIcPT024066 for caml-list@inria.fr; Tue, 22 Oct 2002 15:18:38 +0200 Date: Tue, 22 Oct 2002 15:18:38 +0200 From: Stefano Zacchiroli To: caml-list@inria.fr Subject: Re: [Caml-list] Camlp4 pretty print comments Message-ID: <20021022131838.GB23724@cs.unibo.it> Mail-Followup-To: caml-list@inria.fr References: <20021022111642R.garrigue@kurims.kyoto-u.ac.jp> <20021022131530.A3558@verdot.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021022131530.A3558@verdot.inria.fr> User-Agent: Mutt/1.4i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Oct 22, 2002 at 01:15:30PM +0200, Daniel de Rauglaudre wrote: > Because comments are not represented in the syntax tree. To pretty > print, Camlp4 reads the file again, using the locations inside the > syntax tree to determine where the comments are located. Why comments are not represented? It's because the lexer don't return them or because the standard ocaml grammar rules skip them? If the first case does apply, is possible to add a camlp4 rule to retain them, right? BTW, does ocamldoc use the same trick (reading twice)? TIA, Cheers. -- Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro "I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!" -- G.Romney ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners