<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">I'm happy to apply any patches :) Even better if you wanted to extend<br>
the tutorial to support things like garbage collection.</blockquote><div><br>As I go along in my project and explore these features I might be willing to produce code for additional chapters but I don't think I have time to dedicate to it now.<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">What was the problem? I just tested it out on fedora 10 and it worked<br>
after I installed the ocaml, ocaml-camlp4, and ocaml-camlp4-devel<br>
rpms.<br></blockquote></div><br>When I tried it the pre-processor executable had not been created and installed.  When the compiler tried to pass it through, it couldn't find anything.  It has been a little bit since I tried, and there may have been updates, so the issue may have been fixed.<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Well you still run into that with ocamllex/ocamlyacc :) Maybe I'm just<br>
used to the stream syntax extension, but I figured it was fair game<br>
since it's part of the standard install. It's not my fault the fedora<br>
project decided to make it not part of the standard ocaml install :)</blockquote><div><br>That is perfectly understandable.  My problem was that I had never seen the stream syntax before.  While I'm no OCaml master, I have used it for a while and so it might be that other people coming to the tutorial may have the same experience.  Secondly, it seems odd to be writing custom parsers and lexers after tools like Bison and Flex (and ocamllex and ocamlyacc) have been around for some time.  Is there any particular reason the C++ tutorial is using  hand coded parsers and lexers?  Is there a technical reason?<br>
<br>- Chris Wailes<br></div><br><div class="gmail_quote">On Tue, Apr 21, 2009 at 3:46 PM, Erick Tryzelaar <span dir="ltr"><<a href="mailto:idadesub@users.sourceforge.net">idadesub@users.sourceforge.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/4/13 Chris Wailes <<a href="mailto:chris.wailes@gmail.com">chris.wailes@gmail.com</a>>:<br>

<div><div></div><div class="h5">> I'm currently going through the LLVM OCaml bindings tutorial in preparation<br>
> for using LLVM in my own project.  While the tutorial is very helpful, it<br>
> was somewhat hard to start due to the fact that I plan on using ocamllex and<br>
> ocmalyacc and the tutorial hand rolls their own lexer and parser.<br>
><br>
> I have managed to adapt almost all of the tutorial code into using ocamllex<br>
> and ocamlyacc (the only thing I'm missing is the ability to assign<br>
> precendence to user defined binary and unary operators), and was wondering<br>
> if ther would be an interest in adding my code as supplimental material.<br>
<br>
</div></div>Great! I'd be happy to add this, though I think as as an addendum<br>
instead of a replacement unless the community feels strongly about it.<br>
Since most of the llvm documentation is for c++, I wanted the ocaml<br>
developers to be able to read the ocaml tutorial then the c++ tutorial<br>
and it be nearly one-to-one. I thought camlp4 did a much better job of<br>
matching the c++ tutorial than ocamllex/ocamlyacc. That said, a lot of<br>
people use them and it'd be handy to see how to use them with llvm as<br>
well.<br>
<div class="im"><br>
<br>
On Sat, Apr 18, 2009 at 11:02 AM, Jon Harrop <<a href="mailto:jon@ffconsultancy.com">jon@ffconsultancy.com</a>> wrote:<br>
> You may also want to write an even smaller parser using camlp4...<br>
<br>
</div>I'm happy to apply any patches :) Even better if you wanted to extend<br>
the tutorial to support things like garbage collection.<br>
<br>
<br>
2009/4/19 Chris Wailes <<a href="mailto:chris.wailes@gmail.com">chris.wailes@gmail.com</a>>:<br>
<div class="im">> I would consider doing this, but one of the main reasons I couldn't use the<br>
> main tutorial was because the Fedora 10 camlp4 package was messed up and the<br>
> pre processors weren't linked correctly (I don't think Fedora likes OCaml<br>
> much).<br>
<br>
</div>What was the problem? I just tested it out on fedora 10 and it worked<br>
after I installed the ocaml, ocaml-camlp4, and ocaml-camlp4-devel<br>
rpms.<br>
<div class="im"><br>
> Anyway, I think it might be best to not include camlp4 macros in the<br>
</div><div class="im">> parser, simply to reduce the number of tools that someone needs to know to<br>
> understand the files.  If they know camlp4 they can always add support for<br>
> it in their own projects or as an exercise in understanding the tutorial<br>
> code.<br>
<br>
</div>Well you still run into that with ocamllex/ocamlyacc :) Maybe I'm just<br>
used to the stream syntax extension, but I figured it was fair game<br>
since it's part of the standard install. It's not my fault the fedora<br>
project decided to make it not part of the standard ocaml install :)<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br>