~ubuntu-branches/ubuntu/hardy/ocaml-doc/hardy

« back to all changes in this revision

Viewing changes to camlp4.html/lib/Plexer.html

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2007-09-08 01:49:22 UTC
  • mfrom: (0.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070908014922-lvihyehz0ndq7suu
Tags: 3.10-1
* New upstream release.
* Removed camlp4 documentation since it is not up-to-date.
* Updated to standards version 3.7.2, no changes needed.
* Updated my email address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html>
2
 
<head>
3
 
<link rel="stylesheet" href="style.css" type="text/css">
4
 
<link rel="Start" href="index.html">
5
 
<link rel="previous" href="Pcaml.html">
6
 
<link rel="next" href="Quotation.html">
7
 
<link rel="Up" href="index.html">
8
 
<link title="Index of types" rel=Appendix href="index_types.html">
9
 
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
10
 
<link title="Index of values" rel=Appendix href="index_values.html">
11
 
<link title="Index of modules" rel=Appendix href="index_modules.html">
12
 
<link title="Index of module types" rel=Appendix href="index_module_types.html">
13
 
<link title="Grammar" rel="Chapter" href="Grammar.html">
14
 
<link title="Extfun" rel="Chapter" href="Extfun.html">
15
 
<link title="Pcaml" rel="Chapter" href="Pcaml.html">
16
 
<link title="Plexer" rel="Chapter" href="Plexer.html">
17
 
<link title="Quotation" rel="Chapter" href="Quotation.html">
18
 
<link title="Token" rel="Chapter" href="Token.html">
19
 
<link title="Stdpp" rel="Chapter" href="Stdpp.html"><title>Plexer</title>
20
 
</head>
21
 
<body>
22
 
<div class="navbar"><a href="Pcaml.html">Previous</a>
23
 
&nbsp;<a href="index.html">Up</a>
24
 
&nbsp;<a href="Quotation.html">Next</a>
25
 
</div>
26
 
<center><h1>Module <a href="type_Plexer.html">Plexer</a></h1></center>
27
 
<br>
28
 
<pre><span class="keyword">module</span> Plexer: <code class="type">sig  end</code></pre><div class="info">
29
 
A lexical analyzer.<br>
30
 
</div>
31
 
<hr width="100%">
32
 
<pre><span class="keyword">val</span> <a name="VALgmake"></a>gmake : <code class="type">unit -> Token.t <a href="Token.html#TYPEglexer">Token.glexer</a></code></pre><div class="info">
33
 
Some lexer provided. See the module <code class="code">Token</code>. The tokens returned
34
 
       follow the Objective Caml and the Revised syntax lexing rules.
35
 
<p>
36
 
 
37
 
       The meaning of the tokens are:<ul>
38
 
<li>     * <code class="code">("", s)</code> is the keyword <code class="code">s</code>.</li>
39
 
<li>     * <code class="code">("LIDENT", s)</code> is the ident <code class="code">s</code> starting with a lowercase letter.</li>
40
 
<li>     * <code class="code">("UIDENT", s)</code> is the ident <code class="code">s</code> starting with an uppercase letter.</li>
41
 
<li>     * <code class="code">("INT", s)</code> (resp. <code class="code">"INT32"</code>, <code class="code">"INT64"</code> and <code class="code">"NATIVEINT"</code>)
42
 
         is an integer constant whose string source is <code class="code">s</code>.</li>
43
 
<li>     * <code class="code">("FLOAT", s)</code> is a float constant whose string source is <code class="code">s</code>.</li>
44
 
<li>     * <code class="code">("STRING", s)</code> is the string constant <code class="code">s</code>.</li>
45
 
<li>     * <code class="code">("CHAR", s)</code> is the character constant <code class="code">s</code>.</li>
46
 
<li>     * <code class="code">("QUOTATION", "t:s")</code> is a quotation <code class="code">t</code> holding the string <code class="code">s</code>.</li>
47
 
<li>     * <code class="code">("ANTIQUOT", "t:s")</code> is an antiquotation <code class="code">t</code> holding the string <code class="code">s</code>.</li>
48
 
<li>     * <code class="code">("LOCATE", "i:s")</code> is a location directive at pos <code class="code">i</code> holding <code class="code">s</code>.</li>
49
 
<li>     * <code class="code">("EOI", "")</code> is the end of input.</li>
50
 
</ul>
51
 
 
52
 
       The associated token patterns in the EXTEND statement hold the
53
 
       same names than the first string (constructor name) of the tokens
54
 
       expressions above.
55
 
<p>
56
 
 
57
 
       Warning: the string associated with the constructor <code class="code">STRING</code> is
58
 
       the string found in the source without any interpretation. In
59
 
       particular, the backslashes are not interpreted. For example, if
60
 
       the input is <code class="code">"\n"</code> the string is *not* a string with one
61
 
       element containing the character "return", but a string of two
62
 
       elements: the backslash and the character <code class="code">"n"</code>. To interpret
63
 
       a string use the function <code class="code">Token.eval_string</code>. Same thing for
64
 
       the constructor <code class="code">CHAR</code>: to get the character, don't get the
65
 
       first character of the string, but use the function
66
 
       <code class="code">Token.eval_char</code>.
67
 
<p>
68
 
 
69
 
       The lexer do not use global (mutable) variables: instantiations
70
 
       of <code class="code">Plexer.gmake ()</code> do not perturb each other.<br>
71
 
</div>
72
 
<pre><span class="keyword">val</span> <a name="VALdollar_for_antiquotation"></a>dollar_for_antiquotation : <code class="type">bool ref</code></pre><div class="info">
73
 
When True (default), the next call to <code class="code">Plexer.make ()</code> returns a
74
 
       lexer where the dollar sign is used for antiquotations. If False,
75
 
       the dollar sign can be used as token.<br>
76
 
</div>
77
 
<pre><span class="keyword">val</span> <a name="VALspecific_space_dot"></a>specific_space_dot : <code class="type">bool ref</code></pre><div class="info">
78
 
When False (default), the next call to <code class="code">Plexer.make ()</code> returns a
79
 
       lexer where the dots can be preceded by spaces. If True, dots
80
 
       preceded by spaces return the keyword " ." (space dot), otherwise
81
 
       return the keyword "." (dot).<br>
82
 
</div>
83
 
<pre><span class="keyword">val</span> <a name="VALno_quotations"></a>no_quotations : <code class="type">bool ref</code></pre><div class="info">
84
 
When True, all lexers built by <code class="code">Plexer.make ()</code> do not lex the
85
 
       quotation syntax any more. Default is False (quotations are
86
 
       lexed).<br>
87
 
</div>
88
 
</body></html>
 
 
b'\\ No newline at end of file'