2004-05-03 11:59:46 +01:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-03-21 18:42:58 +00:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-05-03 11:59:46 +01:00
|
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
2006-02-03 20:54:03 +00:00
|
|
|
|
2005-02-19 22:16:42 +00:00
|
|
|
<sect1 id="ch-system-flex" role="wrap">
|
2006-02-03 20:54:03 +00:00
|
|
|
<?dbhtml filename="flex.html"?>
|
|
|
|
|
2007-09-07 20:16:43 +01:00
|
|
|
<sect1info condition="script">
|
|
|
|
<productname>flex</productname>
|
|
|
|
<productnumber>&flex-version;</productnumber>
|
|
|
|
<address>&flex-url;</address>
|
|
|
|
</sect1info>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<title>Flex-&flex-version;</title>
|
|
|
|
|
|
|
|
<indexterm zone="ch-system-flex">
|
|
|
|
<primary sortas="a-Flex">Flex</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title/>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>The Flex package contains a utility for generating programs that
|
|
|
|
recognize patterns in text.</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>&buildtime;</segtitle>
|
|
|
|
<segtitle>&diskspace;</segtitle>
|
2004-01-12 23:23:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<seglistitem>
|
2006-05-14 21:16:56 +01:00
|
|
|
<seg>&flex-ch6-sbu;</seg>
|
|
|
|
<seg>&flex-ch6-du;</seg>
|
2006-02-03 20:54:03 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="installation">
|
|
|
|
<title>Installation of Flex</title>
|
2017-04-28 18:41:47 +01:00
|
|
|
|
2017-08-14 23:28:28 +01:00
|
|
|
<para>First, fix a problem introduced with glibc-2.26:</para>
|
|
|
|
|
|
|
|
<screen><userinput remap="pre">sed -i "/math.h/a #include <malloc.h>" src/flexdef.h</userinput></screen>
|
|
|
|
|
2016-11-09 19:48:02 +00:00
|
|
|
<para>The build procedure assumes the <application>help2man</application>
|
|
|
|
program is available to create a man page from the executable --help option.
|
2016-11-22 05:15:50 +00:00
|
|
|
This is not present, so we use an environment variable to skip this process.
|
2016-11-09 19:48:02 +00:00
|
|
|
Now, prepare Flex for compilation:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2016-11-09 19:48:02 +00:00
|
|
|
<screen><userinput remap="configure">HELP2MAN=/tools/bin/true \
|
|
|
|
./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Compile the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2008-10-08 12:51:13 +01:00
|
|
|
<para>To test the results (about 0.5 SBU), issue:</para>
|
2007-09-18 22:11:00 +01:00
|
|
|
|
2012-12-12 18:47:49 +00:00
|
|
|
<screen><userinput remap="test">make check</userinput></screen>
|
2012-08-13 21:20:36 +01:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>Install the package:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2007-09-18 22:11:00 +01:00
|
|
|
<screen><userinput remap="install">make install</userinput></screen>
|
2015-11-18 17:56:10 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<para>A few programs do not know about <command>flex</command> yet and
|
|
|
|
try to run its predecessor, <command>lex</command>. To support those
|
2014-04-08 04:02:51 +01:00
|
|
|
programs, create a symbolic link named <filename>lex</filename> that
|
|
|
|
runs <filename>flex</filename> in <command>lex</command> emulation
|
2006-02-03 20:54:03 +00:00
|
|
|
mode:</para>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2014-08-22 11:18:41 +01:00
|
|
|
<screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen>
|
2003-11-01 22:31:50 +00:00
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 id="contents-flex" role="content">
|
|
|
|
<title>Contents of Flex</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed programs</segtitle>
|
2009-05-10 19:36:23 +01:00
|
|
|
<segtitle>Installed libraries</segtitle>
|
2014-07-21 10:08:33 +01:00
|
|
|
<segtitle>Installed directory</segtitle>
|
2006-02-03 20:54:03 +00:00
|
|
|
|
|
|
|
<seglistitem>
|
2014-04-08 04:02:51 +01:00
|
|
|
<seg>flex, flex++ (link to flex), and lex (link to flex)</seg>
|
2018-04-14 17:12:46 +01:00
|
|
|
<seg>libfl.so</seg>
|
2012-10-15 19:26:20 +01:00
|
|
|
<seg>/usr/share/doc/flex-&flex-version;</seg>
|
2006-02-03 20:54:03 +00:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="flex">
|
|
|
|
<term><command>flex</command></term>
|
|
|
|
<listitem>
|
|
|
|
<para>A tool for generating programs that recognize patterns in text;
|
|
|
|
it allows for the versatility to specify the rules for pattern-finding,
|
|
|
|
eradicating the need to develop a specialized program</para>
|
|
|
|
<indexterm zone="ch-system-flex flex">
|
|
|
|
<primary sortas="b-flex">flex</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-10-15 19:26:20 +01:00
|
|
|
<varlistentry id="flexpp">
|
|
|
|
<term><command>flex++</command></term>
|
|
|
|
<listitem>
|
2013-02-11 20:09:22 +00:00
|
|
|
<para>An extension of flex, is used for generating C++ code
|
2012-10-15 19:26:20 +01:00
|
|
|
and classes. It is a symbolic link to <command>flex</command></para>
|
|
|
|
<indexterm zone="ch-system-flex flexpp">
|
|
|
|
<primary sortas="b-flex++">flex++</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2006-02-03 20:54:03 +00:00
|
|
|
<varlistentry id="lex">
|
|
|
|
<term><command>lex</command></term>
|
|
|
|
<listitem>
|
2018-04-14 17:12:46 +01:00
|
|
|
<para>A symbolic link that runs <command>flex</command> in
|
2006-02-03 20:54:03 +00:00
|
|
|
<command>lex</command> emulation mode</para>
|
|
|
|
<indexterm zone="ch-system-flex lex">
|
|
|
|
<primary sortas="b-lex">lex</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
2014-02-18 18:46:43 +00:00
|
|
|
<varlistentry id="libfl">
|
|
|
|
<term><filename class="libraryfile">libfl</filename></term>
|
2006-02-03 20:54:03 +00:00
|
|
|
<listitem>
|
|
|
|
<para>The <filename class="libraryfile">flex</filename> library</para>
|
2014-02-18 18:46:43 +00:00
|
|
|
<indexterm zone="ch-system-flex libfl">
|
|
|
|
<primary sortas="c-libfl">libfl</primary>
|
2006-02-03 20:54:03 +00:00
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-05-03 11:59:46 +01:00
|
|
|
|
|
|
|
</sect1>
|