Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Possible bug in module and class?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven Luther <luther@d...>
Subject: Re: [Caml-list] Camlp4 pretty print comments
On Tue, Oct 22, 2002 at 01:15:30PM +0200, Daniel de Rauglaudre wrote:
> Hi,
> 
> On Mon, Oct 21, 2002 at 09:35:47PM -0700, Quetzalcoatl Bradley wrote:
> > 
> > Why are comments not printed when the input is from standard input?
> 
> 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.
> 
> If the input file is standard input, it is not possible since it is
> not possible to read it twice.

What about storing the comments when parsing the standard input with
their location in the file, so you can easily add them again when
generating the file ?

Friendly,

Sven Luther
-------------------
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