From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id E67DEBBAF for ; Mon, 9 Aug 2010 09:04:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQFAFhFX0yNTDBjgWdsb2JhbACTUIx0FQEBFiIiwjOFOgSJOw X-IronPort-AV: E=Sophos;i="4.55,340,1278280800"; d="scan'208";a="56873876" Received: from os.inf.tu-dresden.de ([141.76.48.99]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 09 Aug 2010 09:04:17 +0200 Received: from [2002:8d4c:3001:48:222:68ff:fe19:71d] (helo=blau.inf.tu-dresden.de) by os.inf.tu-dresden.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) id 1OiMPA-0002bq-Pl for caml-list@yquem.inria.fr; Mon, 09 Aug 2010 09:04:16 +0200 Received: from tews by blau.inf.tu-dresden.de with local (Exim 4.72) (envelope-from ) id 1OiMP9-0000mJ-Mn for caml-list@yquem.inria.fr; Mon, 09 Aug 2010 09:04:15 +0200 From: Hendrik Tews To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] [Camlp4] questions References: Date: Mon, 09 Aug 2010 09:04:15 +0200 In-Reply-To: (Raphael Proust's message of "Fri, 6 Aug 2010 16:57:31 +0200") Message-ID: <6xfwyofes0.fsf@blau.inf.tu-dresden.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam: no; 0.00; hendrik:01 tews:01 tews:01 camlp:01 transforming:01 syntax:01 mkloc:01 syntax:01 mkloc:01 ocamldoc:01 camlp:01 parsers:01 hendrik:01 tu-dresden:01 caml-list:01 Raphael Proust 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