caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Tews <tews@os.inf.tu-dresden.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [Camlp4] questions
Date: Mon, 09 Aug 2010 09:04:15 +0200	[thread overview]
Message-ID: <6xfwyofes0.fsf@blau.inf.tu-dresden.de> (raw)
In-Reply-To: <AANLkTimjfsCX6j-N1_u9pDLYnbhaK=RK-VN=s06oGj3Z@mail.gmail.com> (Raphael Proust's message of "Fri, 6 Aug 2010 16:57:31 +0200")

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


  reply	other threads:[~2010-08-09  7:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 14:57 Raphael Proust
2010-08-09  7:04 ` Hendrik Tews [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-04  7:59 camlp4 questions Conglun Yao
2008-04-04  8:38 ` [Caml-list] " Richard Jones
2008-04-04  9:56   ` Conglun Yao
2008-04-04 13:42 ` Nicolas Pouillard
2007-07-23  9:46 Christophe Raffalli
2007-07-25  8:29 ` [Caml-list] " Nicolas Pouillard
2002-02-08 21:24 [Caml-list] Camlp4 questions Harrison, John R
2002-02-09 10:30 ` Daniel de Rauglaudre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6xfwyofes0.fsf@blau.inf.tu-dresden.de \
    --to=tews@os.inf.tu-dresden.de \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).