[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[54e422c1] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-flex" role="wrap">
|
---|
[54e422c1] | 9 | <?dbhtml filename="flex.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>flex</productname>
|
---|
| 13 | <productnumber>&flex-version;</productnumber>
|
---|
| 14 | <address>&flex-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[54e422c1] | 17 | <title>Flex-&flex-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-flex">
|
---|
| 20 | <primary sortas="a-Flex">Flex</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[673b0d8] | 25 |
|
---|
[54e422c1] | 26 | <para>The Flex package contains a utility for generating programs that
|
---|
| 27 | recognize patterns in text.</para>
|
---|
[6370fa6] | 28 |
|
---|
[54e422c1] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 32 |
|
---|
[54e422c1] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&flex-ch6-sbu;</seg>
|
---|
| 35 | <seg>&flex-ch6-du;</seg>
|
---|
[54e422c1] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[73aedd1d] | 38 |
|
---|
[54e422c1] | 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of Flex</title>
|
---|
| 43 |
|
---|
| 44 | <para>Prepare Flex for compilation:</para>
|
---|
[73aedd1d] | 45 |
|
---|
[0445a3d] | 46 | <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
|
---|
[73aedd1d] | 47 |
|
---|
[54e422c1] | 48 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 49 |
|
---|
[0445a3d] | 50 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 51 |
|
---|
[0ddb173] | 52 | <para>To test the results, issue:</para>
|
---|
[0445a3d] | 53 |
|
---|
[0ddb173] | 54 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
[73aedd1d] | 55 |
|
---|
[54e422c1] | 56 | <para>Install the package:</para>
|
---|
[73aedd1d] | 57 |
|
---|
[0445a3d] | 58 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 59 |
|
---|
[54e422c1] | 60 | <para>There are some packages that expect to find the
|
---|
| 61 | <filename class="libraryfile">lex</filename> library in <filename
|
---|
| 62 | class="directory">/usr/lib</filename>. Create a symlink to account for
|
---|
| 63 | this:</para>
|
---|
[73aedd1d] | 64 |
|
---|
[0445a3d] | 65 | <screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
|
---|
[73aedd1d] | 66 |
|
---|
[54e422c1] | 67 | <para>A few programs do not know about <command>flex</command> yet and
|
---|
| 68 | try to run its predecessor, <command>lex</command>. To support those
|
---|
| 69 | programs, create a wrapper script named <filename>lex</filename> that
|
---|
| 70 | calls <filename>flex</filename> in <command>lex</command> emulation
|
---|
| 71 | mode:</para>
|
---|
[73aedd1d] | 72 |
|
---|
[0445a3d] | 73 | <screen><userinput remap="install">cat > /usr/bin/lex << "EOF"
|
---|
[d72e04a] | 74 | <literal>#!/bin/sh
|
---|
[73aedd1d] | 75 | # Begin /usr/bin/lex
|
---|
| 76 |
|
---|
| 77 | exec /usr/bin/flex -l "$@"
|
---|
| 78 |
|
---|
[d72e04a] | 79 | # End /usr/bin/lex</literal>
|
---|
| 80 | EOF
|
---|
[5998892] | 81 | chmod -v 755 /usr/bin/lex</userinput></screen>
|
---|
[73aedd1d] | 82 |
|
---|
[54e422c1] | 83 | </sect2>
|
---|
| 84 |
|
---|
| 85 | <sect2 id="contents-flex" role="content">
|
---|
| 86 | <title>Contents of Flex</title>
|
---|
| 87 |
|
---|
| 88 | <segmentedlist>
|
---|
| 89 | <segtitle>Installed programs</segtitle>
|
---|
| 90 | <segtitle>Installed library</segtitle>
|
---|
| 91 |
|
---|
| 92 | <seglistitem>
|
---|
| 93 | <seg>flex and lex</seg>
|
---|
| 94 | <seg>libfl.a</seg>
|
---|
| 95 | </seglistitem>
|
---|
| 96 | </segmentedlist>
|
---|
| 97 |
|
---|
| 98 | <variablelist>
|
---|
| 99 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 100 | <?dbfo list-presentation="list"?>
|
---|
| 101 | <?dbhtml list-presentation="table"?>
|
---|
| 102 |
|
---|
| 103 | <varlistentry id="flex">
|
---|
| 104 | <term><command>flex</command></term>
|
---|
| 105 | <listitem>
|
---|
| 106 | <para>A tool for generating programs that recognize patterns in text;
|
---|
| 107 | it allows for the versatility to specify the rules for pattern-finding,
|
---|
| 108 | eradicating the need to develop a specialized program</para>
|
---|
| 109 | <indexterm zone="ch-system-flex flex">
|
---|
| 110 | <primary sortas="b-flex">flex</primary>
|
---|
| 111 | </indexterm>
|
---|
| 112 | </listitem>
|
---|
| 113 | </varlistentry>
|
---|
| 114 |
|
---|
| 115 | <varlistentry id="lex">
|
---|
| 116 | <term><command>lex</command></term>
|
---|
| 117 | <listitem>
|
---|
| 118 | <para>A script that runs <command>flex</command> in
|
---|
| 119 | <command>lex</command> emulation mode</para>
|
---|
| 120 | <indexterm zone="ch-system-flex lex">
|
---|
| 121 | <primary sortas="b-lex">lex</primary>
|
---|
| 122 | </indexterm>
|
---|
| 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
| 126 | <varlistentry id="libfl.a">
|
---|
| 127 | <term><filename class="libraryfile">libfl.a</filename></term>
|
---|
| 128 | <listitem>
|
---|
| 129 | <para>The <filename class="libraryfile">flex</filename> library</para>
|
---|
| 130 | <indexterm zone="ch-system-flex libfl.a">
|
---|
| 131 | <primary sortas="c-libfl.a">libfl.a</primary>
|
---|
| 132 | </indexterm>
|
---|
| 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 |
|
---|
| 136 | </variablelist>
|
---|
| 137 |
|
---|
| 138 | </sect2>
|
---|
[673b0d8] | 139 |
|
---|
| 140 | </sect1>
|
---|