<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/f0e465fbb5618b70e907c5ce74cd79b9"
  from="Jake Donham &lt;jake@d...&gt;"
  author="Jake Donham"
  date="2009-01-06T18:19:02"
  subject="Re: [Caml-list] Parsing simple type expressions"
  prev="2009/01/0544a2b442f586defaedfcb8e169a9bf"
  next="2009/01/e5076f52f057f4aad5ae55a4d1fa82fd"
  prev-in-thread="2009/01/a6043389411300c6b287bdae00efbe5d"
  next-in-thread="2009/01/e5076f52f057f4aad5ae55a4d1fa82fd"
  prev-thread="2009/01/6383f62ce2839d25bfa9517ddbb5e894"
  next-thread="2009/01/f5cd2134e6e753541b1fba3d79d51b18"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Parsing simple type expressions">
<msg 
  url="2009/01/aeedbe479141062a21fdf4ba4e50bd05"
  from="Paolo Donadeo &lt;p.donadeo@g...&gt;"
  author="Paolo Donadeo"
  date="2009-01-06T14:03:52"
  subject="Parsing simple type expressions">
<msg 
  url="2009/01/0544a2b442f586defaedfcb8e169a9bf"
  from="David Allsopp &lt;dra-news@m...&gt;"
  author="David Allsopp"
  date="2009-01-06T15:12:45"
  subject="RE: [Caml-list] Parsing simple type expressions">
<msg 
  url="2009/01/b4e7d9b110b958e610c0cb09494a3d94"
  from="Martin Jambon &lt;martin.jambon@e...&gt;"
  author="Martin Jambon"
  date="2009-01-06T21:11:19"
  subject="Re: [Caml-list] Parsing simple type expressions">
<msg 
  url="2009/01/01da1667c2c6fe8937d5f2a798c9816e"
  from="Matthieu Wipliez &lt;mwipliez@y...&gt;"
  author="Matthieu Wipliez"
  date="2009-01-06T22:50:10"
  subject="Re : [Caml-list] Parsing simple type expressions">
<msg 
  url="2009/01/a6043389411300c6b287bdae00efbe5d"
  from="Paolo Donadeo &lt;p.donadeo@g...&gt;"
  author="Paolo Donadeo"
  date="2009-01-07T22:50:46"
  subject="Re: [Caml-list] Parsing simple type expressions">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2009/01/f0e465fbb5618b70e907c5ce74cd79b9"
  from="Jake Donham &lt;jake@d...&gt;"
  author="Jake Donham"
  date="2009-01-06T18:19:02"
  subject="Re: [Caml-list] Parsing simple type expressions">
<msg 
  url="2009/01/e5076f52f057f4aad5ae55a4d1fa82fd"
  from="Paolo Donadeo &lt;p.donadeo@g...&gt;"
  author="Paolo Donadeo"
  date="2009-01-06T21:00:14"
  subject="Re: [Caml-list] Parsing simple type expressions">
</msg>
</msg>
</msg>
</thread>

<contents>
On Tue, Jan 6, 2009 at 6:03 AM, Paolo Donadeo &lt;p.donadeo@gmail.com&gt; wrote:

&gt; For a serializer I'm writing I need to parse simple OCaml type
&gt; 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

</contents>

</message>

