[3f8be484] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[aa18ac0] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3f8be484] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-flex" role="wrap">
|
---|
| 9 | <?dbhtml filename="flex.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Flex-&flex-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-flex">
|
---|
| 14 | <primary sortas="a-Flex">Flex</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The Flex package contains a utility for generating programs that
|
---|
| 21 | recognize patterns in text.</para>
|
---|
| 22 |
|
---|
| 23 | </sect2>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="installation">
|
---|
| 26 | <title>Installation of Flex</title>
|
---|
| 27 |
|
---|
[4bb4b626] | 28 | <para os="a">Prepare Flex for compilation:</para>
|
---|
[3f8be484] | 29 |
|
---|
[b27081c4] | 30 | <screen os="b"><userinput>./configure \
|
---|
| 31 | --prefix=/usr \
|
---|
| 32 | --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
---|
[3f8be484] | 33 |
|
---|
[4bb4b626] | 34 | <para os="c">Compile the package:</para>
|
---|
[3f8be484] | 35 |
|
---|
[4bb4b626] | 36 | <screen os="d"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 37 |
|
---|
[686839b] | 38 | <para os="e">To test the results, issue:</para>
|
---|
| 39 |
|
---|
| 40 | <screen os="e2"><userinput remap="test">make check</userinput></screen>
|
---|
[3f8be484] | 41 |
|
---|
[41a5f16] | 42 | <para os="e3">The test suite will report 3 failures for tests that
|
---|
| 43 | use <command>bison</command>, which is not installed yet. For full
|
---|
| 44 | test coverage, you can run Flex's test suite again after Bison
|
---|
| 45 | is installed.</para>
|
---|
| 46 |
|
---|
[4bb4b626] | 47 | <para os="f">Install the package:</para>
|
---|
[3f8be484] | 48 |
|
---|
[4bb4b626] | 49 | <screen os="g"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 50 |
|
---|
[a62153d] | 51 | <para os="h">A few programs do not know about <command>flex</command> yet and
|
---|
[3f8be484] | 52 | try to run its predecessor, <command>lex</command>. To support those
|
---|
[966dad90] | 53 | programs, create a symbolic link named <filename>lex</filename> that
|
---|
| 54 | runs <filename>flex</filename> in <command>lex</command> emulation
|
---|
[3f8be484] | 55 | mode:</para>
|
---|
| 56 |
|
---|
[966dad90] | 57 | <screen os="i"><userinput>ln -sv flex /usr/bin/lex</userinput></screen>
|
---|
[3f8be484] | 58 |
|
---|
| 59 | </sect2>
|
---|
| 60 |
|
---|
| 61 | <sect2 id="contents-flex" role="content">
|
---|
| 62 | <title>Contents of Flex</title>
|
---|
| 63 |
|
---|
| 64 | <segmentedlist>
|
---|
| 65 | <segtitle>Installed programs</segtitle>
|
---|
[f5e37b2] | 66 | <segtitle>Installed libraries</segtitle>
|
---|
[c873165] | 67 | <segtitle>Installed directory</segtitle>
|
---|
[3f8be484] | 68 |
|
---|
| 69 | <seglistitem>
|
---|
[c2102b28] | 70 | <seg>flex, flex++ (link to flex), lex</seg>
|
---|
| 71 | <seg>libfl.[a,so], libfl_pic.[a,so]</seg>
|
---|
[c873165] | 72 | <seg>/usr/share/doc/flex-&flex-version;</seg>
|
---|
[3f8be484] | 73 | </seglistitem>
|
---|
| 74 | </segmentedlist>
|
---|
| 75 |
|
---|
| 76 | <variablelist>
|
---|
| 77 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 78 | <?dbfo list-presentation="list"?>
|
---|
| 79 | <?dbhtml list-presentation="table"?>
|
---|
| 80 |
|
---|
| 81 | <varlistentry id="flex">
|
---|
| 82 | <term><command>flex</command></term>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>A tool for generating programs that recognize patterns in text;
|
---|
| 85 | it allows for the versatility to specify the rules for pattern-finding,
|
---|
| 86 | eradicating the need to develop a specialized program</para>
|
---|
| 87 | <indexterm zone="ch-system-flex flex">
|
---|
| 88 | <primary sortas="b-flex">flex</primary>
|
---|
| 89 | </indexterm>
|
---|
| 90 | </listitem>
|
---|
| 91 | </varlistentry>
|
---|
| 92 |
|
---|
[2b220db9] | 93 | <varlistentry id="flexpp">
|
---|
| 94 | <term><command>flex++</command></term>
|
---|
| 95 | <listitem>
|
---|
| 96 | <para>Link to <command>flex</command> which makes it generate C++
|
---|
| 97 | scanner classes</para>
|
---|
| 98 | <indexterm zone="ch-system-flex flexpp">
|
---|
| 99 | <primary sortas="b-flex++">flex++</primary>
|
---|
| 100 | </indexterm>
|
---|
| 101 | </listitem>
|
---|
| 102 | </varlistentry>
|
---|
| 103 |
|
---|
[3f8be484] | 104 | <varlistentry id="lex">
|
---|
| 105 | <term><command>lex</command></term>
|
---|
| 106 | <listitem>
|
---|
| 107 | <para>A script that runs <command>flex</command> in
|
---|
| 108 | <command>lex</command> emulation mode</para>
|
---|
| 109 | <indexterm zone="ch-system-flex lex">
|
---|
| 110 | <primary sortas="b-lex">lex</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
| 114 |
|
---|
[06c4516] | 115 | <varlistentry id="libfl">
|
---|
| 116 | <term><filename class="libraryfile">libfl</filename></term>
|
---|
[3f8be484] | 117 | <listitem>
|
---|
| 118 | <para>The <filename class="libraryfile">flex</filename> library</para>
|
---|
[06c4516] | 119 | <indexterm zone="ch-system-flex libfl">
|
---|
| 120 | <primary sortas="c-libfl">libfl</primary>
|
---|
[3f8be484] | 121 | </indexterm>
|
---|
| 122 | </listitem>
|
---|
| 123 | </varlistentry>
|
---|
| 124 |
|
---|
[06c4516] | 125 | <varlistentry id="libfl_pic">
|
---|
| 126 | <term><filename class="libraryfile">libfl_pic</filename></term>
|
---|
[8053eec] | 127 | <listitem>
|
---|
| 128 | <para>The <filename class="libraryfile">flex</filename> library</para>
|
---|
[06c4516] | 129 | <indexterm zone="ch-system-flex libfl_pic">
|
---|
| 130 | <primary sortas="c-libfl">libfl_pic</primary>
|
---|
[8053eec] | 131 | </indexterm>
|
---|
| 132 | </listitem>
|
---|
| 133 | </varlistentry>
|
---|
| 134 |
|
---|
[3f8be484] | 135 | </variablelist>
|
---|
| 136 |
|
---|
| 137 | </sect2>
|
---|
| 138 |
|
---|
| 139 | </sect1>
|
---|