1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.06">
</HEAD>
<BODY TEXT=black BGCOLOR=white>
<!--HEVEA command line is: hevea -exec xxdate.exe foot.hva hcamlp4.sty htutorial.tex -o tutorial.html/tutorial.html -->
<!--HACHA command line is: hacha tutorial.html -->
<BR>
<BR>
<BR>
<BR>
<DIV ALIGN=center>
<BR>
<FONT SIZE=7>Camlp4 - Tutorial<BR>
<FONT SIZE=5>version 3.07<BR>
<FONT SIZE=4> Daniel de Rauglaudre<BR>
30 September 2003<BR><BR>
<FONT SIZE=3>Copyright 2002 Institut National de
Recherche en Informatique et Automatique
</FONT></FONT></FONT></FONT></DIV>
<BR>
<UL>
<LI><A HREF="tutorial001.html"> Introduction</A>
<UL>
<LI><A HREF="tutorial001.html#toc1"> Extending the syntax of OCaml</A>
<LI><A HREF="tutorial001.html#toc2"> Using Camlp4 as a command and in the toplevel</A>
<LI><A HREF="tutorial001.html#toc3"> Linking applications using Camlp4 libraries</A>
<LI><A HREF="tutorial001.html#toc4"> Differences in parsing behavior</A>
</UL>
<LI><A HREF="tutorial002.html"> Streams and parsers</A>
<UL>
<LI><A HREF="tutorial002.html#toc5"> Streams</A>
<LI><A HREF="tutorial002.html#toc6"> Parsers</A>
</UL>
<LI><A HREF="tutorial003.html"> Grammars in Camlp4</A>
<UL>
<LI><A HREF="tutorial003.html#toc7"> Grammar, entries: an example</A>
<LI><A HREF="tutorial003.html#toc8"> Remark about the lexer</A>
<LI><A HREF="tutorial003.html#toc9"> Labelled levels and associativity</A>
<LI><A HREF="tutorial003.html#toc10"> Extending a level</A>
<LI><A HREF="tutorial003.html#toc11"> Insert a level</A>
<LI><A HREF="tutorial003.html#toc12"> Infix operator</A>
<LI><A HREF="tutorial003.html#toc13"> Attributed grammars</A>
<LI><A HREF="tutorial003.html#toc14"> Source location</A>
<LI><A HREF="tutorial003.html#toc15"> Meta symbols: lists, options, levels</A>
<LI><A HREF="tutorial003.html#toc16"> Local and global entries</A>
<LI><A HREF="tutorial003.html#toc17"> Deleting a rule</A>
<LI><A HREF="tutorial003.html#toc18"> Parsed language</A>
<LI><A HREF="tutorial003.html#toc19"> Functorial interface</A>
<LI><A HREF="tutorial003.html#toc20"> Writing a lexer</A>
<LI><A HREF="tutorial003.html#toc21"> Grammar for OCaml syntax</A>
</UL>
<LI><A HREF="tutorial004.html"> Quotations</A>
<UL>
<LI><A HREF="tutorial004.html#toc22"> OCaml syntax extensions</A>
<LI><A HREF="tutorial004.html#toc23"> Camlp4 quotation system</A>
<LI><A HREF="tutorial004.html#toc24"> Example: defining constants</A>
<LI><A HREF="tutorial004.html#toc25"> Quotations and the compiler</A>
<LI><A HREF="tutorial004.html#toc26"> Pretty printing the result</A>
<LI><A HREF="tutorial004.html#toc27"> Quotations returning syntax trees</A>
<LI><A HREF="tutorial004.html#toc28"> Example: lambda terms</A>
<LI><A HREF="tutorial004.html#toc29"> Antiquotations</A>
<LI><A HREF="tutorial004.html#toc30"> Locations in antiquotations</A>
<LI><A HREF="tutorial004.html#toc31"> Example: lambda terms, finished</A>
<LI><A HREF="tutorial004.html#toc32"> Conclusion</A>
</UL>
<LI><A HREF="tutorial005.html"> The revised syntax</A>
<UL>
<LI><A HREF="tutorial005.html#toc33"> Practical points</A>
<LI><A HREF="tutorial005.html#toc34"> Phrases</A>
<LI><A HREF="tutorial005.html#toc35"> Imperative constructions</A>
<LI><A HREF="tutorial005.html#toc36"> Tuples and lists</A>
<LI><A HREF="tutorial005.html#toc37"> Irrefutable patterns</A>
<LI><A HREF="tutorial005.html#toc38"> Constructions with matching</A>
<LI><A HREF="tutorial005.html#toc39"> Mutables and assignment</A>
<LI><A HREF="tutorial005.html#toc40"> Types</A>
<LI><A HREF="tutorial005.html#toc41"> Modules</A>
<LI><A HREF="tutorial005.html#toc42"> Classes and objects</A>
<LI><A HREF="tutorial005.html#toc43"> Miscellaneous</A>
<LI><A HREF="tutorial005.html#toc44"> Streams and parsers</A>
</UL>
<LI><A HREF="tutorial006.html"> OCaml syntax trees</A>
<UL>
<LI><A HREF="tutorial006.html#toc45"> Antiquotations</A>
<LI><A HREF="tutorial006.html#toc46"> Antiquotations labels</A>
<LI><A HREF="tutorial006.html#toc47"> Description</A>
</UL>
<LI><A HREF="tutorial007.html"> Extending the syntax of OCaml</A>
<UL>
<LI><A HREF="tutorial007.html#toc48"> Introduction</A>
<LI><A HREF="tutorial007.html#toc49"> Example: ``repeat until'' like in Pascal</A>
<LI><A HREF="tutorial007.html#toc50"> Example: a constant</A>
<LI><A HREF="tutorial007.html#toc51"> Example: a ``for'' loop like in C</A>
<LI><A HREF="tutorial007.html#toc52"> Example: generating printers of types</A>
</UL>
<LI><A HREF="tutorial008.html"> The camlp4 commands</A>
<UL>
<LI><A HREF="tutorial008.html#toc53"> The load options</A>
<LI><A HREF="tutorial008.html#toc54"> The other options</A>
<LI><A HREF="tutorial008.html#toc55"> The predefined object files</A>
<LI><A HREF="tutorial008.html#toc56"> Commands camlp4o and camlp4r</A>
<LI><A HREF="tutorial008.html#toc57"> Toplevel</A>
</UL>
</UL>
<I><FONT COLOR=maroon>
<br>
For remarks about Camlp4, write to:
<img src="http://cristal.inria.fr/~ddr/images/email.jpg" alt=email align=top>
</FONT></I><!--FOOTER-->
<HR SIZE=2><BLOCKQUOTE><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by
<A HREF="http://pauillac.inria.fr/~maranget/hevea/index.html">H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A and H<FONT SIZE=2><sup>A</sup></FONT>C<FONT SIZE=2><sup>H</sup></FONT>A</A>.
</EM></BLOCKQUOTE>
</BODY>
</HTML>
|