[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 |
|
---|
[c873165] | 30 | <screen os="b"><userinput>M4=m4 ./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
---|
[3f8be484] | 31 |
|
---|
[4bb4b626] | 32 | <para os="c">Compile the package:</para>
|
---|
[3f8be484] | 33 |
|
---|
[4bb4b626] | 34 | <screen os="d"><userinput>make</userinput></screen>
|
---|
[3f8be484] | 35 |
|
---|
[686839b] | 36 | <para os="e">To test the results, issue:</para>
|
---|
| 37 |
|
---|
| 38 | <screen os="e2"><userinput remap="test">make check</userinput></screen>
|
---|
[3f8be484] | 39 |
|
---|
[4bb4b626] | 40 | <para os="f">Install the package:</para>
|
---|
[3f8be484] | 41 |
|
---|
[4bb4b626] | 42 | <screen os="g"><userinput>make install</userinput></screen>
|
---|
[3f8be484] | 43 |
|
---|
[a62153d] | 44 | <para os="h">A few programs do not know about <command>flex</command> yet and
|
---|
[3f8be484] | 45 | try to run its predecessor, <command>lex</command>. To support those
|
---|
| 46 | programs, create a wrapper script named <filename>lex</filename> that
|
---|
| 47 | calls <filename>flex</filename> in <command>lex</command> emulation
|
---|
| 48 | mode:</para>
|
---|
| 49 |
|
---|
[a62153d] | 50 | <screen os="i"><userinput>cat > /usr/bin/lex << "EOF"
|
---|
[3f8be484] | 51 | <literal>#!/bin/sh
|
---|
| 52 | # Begin /usr/bin/lex
|
---|
| 53 |
|
---|
| 54 | exec /usr/bin/flex -l "$@"
|
---|
| 55 |
|
---|
| 56 | # End /usr/bin/lex</literal>
|
---|
| 57 | EOF
|
---|
[94e6142] | 58 | chmod -v 755 /usr/bin/lex</userinput></screen>
|
---|
[3f8be484] | 59 |
|
---|
| 60 | </sect2>
|
---|
| 61 |
|
---|
| 62 | <sect2 id="contents-flex" role="content">
|
---|
| 63 | <title>Contents of Flex</title>
|
---|
| 64 |
|
---|
| 65 | <segmentedlist>
|
---|
| 66 | <segtitle>Installed programs</segtitle>
|
---|
[f5e37b2] | 67 | <segtitle>Installed libraries</segtitle>
|
---|
[c873165] | 68 | <segtitle>Installed directory</segtitle>
|
---|
[3f8be484] | 69 |
|
---|
| 70 | <seglistitem>
|
---|
[6d3523f] | 71 | <seg>flex, flex++, and lex</seg>
|
---|
[06c4516] | 72 | <seg>libfl.[a,so] and libfl_pic.[a,so]</seg>
|
---|
[c873165] | 73 | <seg>/usr/share/doc/flex-&flex-version;</seg>
|
---|
[3f8be484] | 74 | </seglistitem>
|
---|
| 75 | </segmentedlist>
|
---|
| 76 |
|
---|
| 77 | <variablelist>
|
---|
| 78 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 79 | <?dbfo list-presentation="list"?>
|
---|
| 80 | <?dbhtml list-presentation="table"?>
|
---|
| 81 |
|
---|
| 82 | <varlistentry id="flex">
|
---|
| 83 | <term><command>flex</command></term>
|
---|
| 84 | <listitem>
|
---|
| 85 | <para>A tool for generating programs that recognize patterns in text;
|
---|
| 86 | it allows for the versatility to specify the rules for pattern-finding,
|
---|
| 87 | eradicating the need to develop a specialized program</para>
|
---|
| 88 | <indexterm zone="ch-system-flex flex">
|
---|
| 89 | <primary sortas="b-flex">flex</primary>
|
---|
| 90 | </indexterm>
|
---|
| 91 | </listitem>
|
---|
| 92 | </varlistentry>
|
---|
| 93 |
|
---|
[2b220db9] | 94 | <varlistentry id="flexpp">
|
---|
| 95 | <term><command>flex++</command></term>
|
---|
| 96 | <listitem>
|
---|
| 97 | <para>Link to <command>flex</command> which makes it generate C++
|
---|
| 98 | scanner classes</para>
|
---|
| 99 | <indexterm zone="ch-system-flex flexpp">
|
---|
| 100 | <primary sortas="b-flex++">flex++</primary>
|
---|
| 101 | </indexterm>
|
---|
| 102 | </listitem>
|
---|
| 103 | </varlistentry>
|
---|
| 104 |
|
---|
[3f8be484] | 105 | <varlistentry id="lex">
|
---|
| 106 | <term><command>lex</command></term>
|
---|
| 107 | <listitem>
|
---|
| 108 | <para>A script that runs <command>flex</command> in
|
---|
| 109 | <command>lex</command> emulation mode</para>
|
---|
| 110 | <indexterm zone="ch-system-flex lex">
|
---|
| 111 | <primary sortas="b-lex">lex</primary>
|
---|
| 112 | </indexterm>
|
---|
| 113 | </listitem>
|
---|
| 114 | </varlistentry>
|
---|
| 115 |
|
---|
[06c4516] | 116 | <varlistentry id="libfl">
|
---|
| 117 | <term><filename class="libraryfile">libfl</filename></term>
|
---|
[3f8be484] | 118 | <listitem>
|
---|
| 119 | <para>The <filename class="libraryfile">flex</filename> library</para>
|
---|
[06c4516] | 120 | <indexterm zone="ch-system-flex libfl">
|
---|
| 121 | <primary sortas="c-libfl">libfl</primary>
|
---|
[3f8be484] | 122 | </indexterm>
|
---|
| 123 | </listitem>
|
---|
| 124 | </varlistentry>
|
---|
| 125 |
|
---|
[06c4516] | 126 | <varlistentry id="libfl_pic">
|
---|
| 127 | <term><filename class="libraryfile">libfl_pic</filename></term>
|
---|
[8053eec] | 128 | <listitem>
|
---|
| 129 | <para>The <filename class="libraryfile">flex</filename> library</para>
|
---|
[06c4516] | 130 | <indexterm zone="ch-system-flex libfl_pic">
|
---|
| 131 | <primary sortas="c-libfl">libfl_pic</primary>
|
---|
[8053eec] | 132 | </indexterm>
|
---|
| 133 | </listitem>
|
---|
| 134 | </varlistentry>
|
---|
| 135 |
|
---|
[3f8be484] | 136 | </variablelist>
|
---|
| 137 |
|
---|
| 138 | </sect2>
|
---|
| 139 |
|
---|
| 140 | </sect1>
|
---|