English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
[Camlp4] questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hendrik Tews <tews@o...>
Subject: Re: [Caml-list] [Camlp4] questions
Raphael Proust <raphlalou@gmail.com> writes:

   Is there a (nice) way to input/output multiple files? I managed reading from a
   second file while transforming one but the code is (really) ugly.

How about

    let start_loc_1 = Syntax.Loc.mkloc file_1 in
    let stream_1 = Stream.of_channel (open_in file_1) in
    let ast_1 = Syntax.parse_implem start_loc_1 stream_1 in

    let start_loc_2 = Syntax.Loc.mkloc file_2 in
    let stream_2 = Stream.of_channel (open_in file_2) in
    let ast_2 = Syntax.parse_implem start_loc_2 stream_2


   For those who ever need it camlunity as the ocamldoc online:
   http://camlunity.ru/camlp4/

Nice, but the main camlp4 problem still needs to be fixed: The
sources are almost not documented. Just look at
http://camlunity.ru/camlp4/Camlp4.html, it _only_ says

   Add an option to the command line options.

;-0

BTW, where are all the modules from the Camlp4Parsers directory,
eg Camlp4OCamlParser?

Bye,

Hendrik