1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2
"http://www.w3.org/TR/REC-html40/loose.dtd">
6
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
7
<META name="GENERATOR" content="hevea 1.06">
12
<BODY TEXT=black BGCOLOR=white>
13
<A HREF="manual008.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
14
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
15
<A HREF="manual010.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
17
<TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
18
<TR><TD BGCOLOR="#2de52d"><DIV ALIGN=center><TABLE>
19
<TR><TD><A NAME="htoc46"><B><FONT SIZE=6>Chapter 8</FONT></B></A></TD>
20
<TD WIDTH="100%" ALIGN=center><B><FONT SIZE=6>Camlp4 library modules</FONT></B></TD>
21
</TR></TABLE></DIV></TD>
24
When linking an application using this library modules, you have to
25
add the file <CODE>gramlib.cma</CODE> in the command line. For example, with
28
ocamlc -I +camlp4 gramlib.cma <the_files>
30
<A NAME="toc31"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
31
<TR><TD BGCOLOR="#66ff66"><DIV ALIGN=center><TABLE>
32
<TR><TD><A NAME="htoc47"><B><FONT SIZE=5>8.1</FONT></B></A></TD>
33
<TD WIDTH="100%" ALIGN=center><B><FONT SIZE=5>Module <TT>MLast</TT>: abstract syntax tree</FONT></B></TD>
34
</TR></TABLE></DIV></TD>
36
This library module is accessible, but not documented. The creation of
37
abstract syntax tree nodes must be done using quotations, defined in
38
the file <CODE>q_MLast.cmo</CODE>. See appendix <A HREF="manual010.html#a:q_ast">A</A>.<BR>
40
However, some functions are provided to access the ``location'' field
43
<CODE>loc_of_expr</CODE> for expressions.
44
<LI><CODE>loc_of_patt</CODE> for patterns.
45
<LI><CODE>loc_of_ctyp</CODE> for types.
46
<LI><CODE>loc_of_module_type</CODE> for module types.
47
<LI><CODE>loc_of_module_expr</CODE> for module expressions.
48
<LI><CODE>loc_of_sig_item</CODE> for signature items.
49
<LI><CODE>loc_of_str_item</CODE> for structure items.
50
<LI><CODE>loc_of_phrase</CODE> for phrases.
52
<A NAME="toc32"></A><TABLE CELLPADDING=0 CELLSPACING=0 WIDTH="100%">
53
<TR><TD BGCOLOR="#66ff66"><DIV ALIGN=center><TABLE>
54
<TR><TD><A NAME="htoc48"><B><FONT SIZE=5>8.2</FONT></B></A></TD>
55
<TD WIDTH="100%" ALIGN=center><B><FONT SIZE=5>Other modules</FONT></B></TD>
56
</TR></TABLE></DIV></TD>
62
<li> <a href="lib/Grammar.html">Module Grammar</a>: Extensible
65
<li> <a href="lib/Extfun.html">Module Extfun</a>: Extensible
68
<li> <a href="lib/Pcaml.html">Module Pcaml</a>: Language grammar,
71
<li> <a href="lib/Plexer.html">Module Plexer</a>: A lexical analyzer.
73
<li> <a href="lib/Quotation.html">Module Quotation</a>: Quotation
76
<li> <a href="lib/Token.html">Module Token</a>: Lexers for Camlp4
79
<li> <a href="lib/Stdpp.html">Module Stdpp</a>: Standard
84
<I><FONT COLOR=maroon>
86
For remarks about Camlp4, write to:
87
<img src="http://cristal.inria.fr/~ddr/images/email.jpg" alt=email align=top>
89
<A HREF="manual008.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
90
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
91
<A HREF="manual010.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>