This file is indexed.

/usr/share/doc/alex/html/api.html is in alex 3.1.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 5. The Interface to an Alex-generated lexer</title><link rel="stylesheet" type="text/css" href="fptools.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Alex User Guide"><link rel="up" href="index.html" title="Alex User Guide"><link rel="prev" href="charsets.html" title="4.2. Syntax of character sets"><link rel="next" href="basic-api.html" title="5.2. Basic interface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. The Interface to an Alex-generated lexer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="charsets.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="basic-api.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="api"></a>Chapter 5. The Interface to an Alex-generated lexer</h1></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="api.html#encoding">5.1. Unicode and UTF-8</a></span></dt><dt><span class="section"><a href="basic-api.html">5.2. Basic interface</a></span></dt><dt><span class="section"><a href="wrappers.html">5.3. Wrappers</a></span></dt><dd><dl><dt><span class="section"><a href="wrappers.html#idp57491152">5.3.1. The "basic" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57504672">5.3.2. The "posn" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57512688">5.3.3. The "monad" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57523328">5.3.4. The "monadUserState" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57538704">5.3.5. The "gscan" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57542976">5.3.6. The bytestring wrappers</a></span></dt><dd><dl><dt><span class="section"><a href="wrappers.html#idp57559904">5.3.6.1. The "basic-bytestring" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57566608">5.3.6.2. The "posn-bytestring" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57573280">5.3.6.3. The "monad-bytestring" wrapper</a></span></dt><dt><span class="section"><a href="wrappers.html#idp57580000">5.3.6.4. The "monadUserState-bytestring" wrapper</a></span></dt></dl></dd></dl></dd></dl></div><p>This section answers the question: "How do I include an
    Alex lexer in my program?"</p><p>Alex provides for a great deal of flexibility in how the
    lexer is exposed to the rest of the program.  For instance,
    there's no need to parse a <code class="literal">String</code> directly if
    you have some special character-buffer operations that avoid the
    overheads of ordinary Haskell <code class="literal">String</code>s.  You
    might want Alex to keep track of the line and column number in the
    input text, or you might wish to do it yourself (perhaps you use a
    different tab width from the standard 8-columns, for
    example).</p><p>The general story is this: Alex provides a basic interface
    to the generated lexer (described in the next section), which you
    can use to parse tokens given an abstract input type with
    operations over it.  You also have the option of including a
    <em class="firstterm">wrapper</em>, which provides a higher-level
    abstraction over the basic interface; Alex comes with several
    wrappers.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="encoding"></a>5.1. Unicode and UTF-8</h2></div></div></div><p>Lexer specifications are written in terms of Unicode
        characters, but Alex works internally on a UTF-8 encoded byte
        sequence.</p><p>
        Depending on how you use Alex, the fact that Alex uses UTF-8
        encoding internally may or may not affect you.  If you use one
        of the wrappers (below) that takes input from a
        Haskell <code class="literal">String</code>, then the UTF-8 encoding is
        handled automatically.  However, if you take input from
        a <code class="literal">ByteString</code>, then it is your
        responsibility to ensure that the input is properly UTF-8
        encoded.
      </p><p>
        None of this applies if you used the <code class="option">--latin1</code>
        option to Alex.  In that case, the input is just a sequence of
        8-bit bytes, interpreted as characters in the Latin-1
        character set.
      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="charsets.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="basic-api.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.2. Syntax of character sets </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 5.2. Basic interface</td></tr></table></div></body></html>