From: philip <philip-f@web.de>
To: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] xml tree -- variant type tree
Date: Tue, 28 Feb 2006 20:56:46 +0000 [thread overview]
Message-ID: <1141160206l.7259l.1l@puck> (raw)
In-Reply-To: <17412.27387.963123.675231@ithif59.inf.tu-dresden.de> (from tews@tcs.inf.tu-dresden.de on Tue Feb 28 16:23:39 2006)
On 02/28/2006 04:23:39 PM, Hendrik Tews wrote:
> Hi,
>
> I would like to read an XML file into an element of some variant
> type, where each constructor corresponds to precisely one type of
> xml nodes. Of course I would need to define the variant type
> beforehand. But how to proceed then?
>
> The humps give me the impression that the right library to use is
> Gerd Stolpmanns pxp. However, this library will produce an object
> tree, which I could probably convert into a variant type with
> some effort.
>
> An alternative would be to use XML-Light, which produces string
> labelled trees, and to translate these string trees myself.
>
> Is there some better solution?
>
>
> Background: I would like to manipulate abstract syntax trees of
> C++ programs. I couldn't find a C++ parser in Ocaml, therefore I
> would like to use Elkhound/Elsa
> (http://www.cs.berkeley.edu/~smcpeak/elkhound/), which can output
> the abstract syntax tree as xml file. Extending Elsa is not an
> option, because for ast manipulations I prefer ocaml pattern
> matching over C++ visitors.
>
> Bye,
>
> Hendrik
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
Hi Hendrik,
i parsed some with tom, it is very efficient:
http://tom.loria.fr/index.php
-Philip
--
And remember, "For every complex problem, there is a solution that is
simple, neat, and wrong."
prev parent reply other threads:[~2006-02-28 20:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 15:23 Hendrik Tews
2006-02-28 15:43 ` [Caml-list] " Michael Wohlwend
2006-02-28 15:52 ` Alain Frisch
2006-02-28 15:47 ` Richard Jones
2006-02-28 15:57 ` Michael Wohlwend
2006-02-28 16:24 ` Alain Frisch
2006-02-28 18:11 ` Michael Wohlwend
2006-02-28 20:56 ` philip [this message]
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=1141160206l.7259l.1l@puck \
--to=philip-f@web.de \
--cc=caml-list@yquem.inria.fr \
--cc=feucht@uni-koblenz.de \
--cc=tews@tcs.inf.tu-dresden.de \
/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).