On Tue, Jan 6, 2009 at 6:03 AM, Paolo Donadeo <p.donadeo@gmail.com> wrote:
For a serializer I'm writing I need to parse simple OCaml type
expressions composed by OCaml basic types, tuples, options and lists.

This is pretty easy with Camlp4, although as you say there isn't much in the docs to point the way. You might take a look at how orpc does it--see the parse_type function in

  http://code.google.com/p/orpc2/source/browse/trunk/src/generator/parse.ml

(I'm going to cover using Camlp4 in this way on the blog I posted yesterday, but not for another week or two.)

You might also look at some other Camlp4-based serialization tools, like bin-prot/type-conv at

  http://www.ocaml.info/home/ocaml_sources.html

Jake