Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 ?


Sven Luther
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: