%general-entities; ]> Flex-&flex-version; Flex <para>The Flex package contains a utility for generating programs that recognize patterns in text.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem><seg>0.1 SBU</seg><seg>3.4 MB</seg></seglistitem> </segmentedlist> <segmentedlist> <segtitle>Flex installation depends on</segtitle> <seglistitem><seg>Bash, Binutils, Bison, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed</seg></seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Flex Flex contains several known bugs. Fix these with the following patch: patch -Np1 -i ../flex-&flex-version;-debian_fixes-2.patch The GNU autotools detects that the Flex source code has been modified by the previous patch, and tries to update the manual page accordingly, but this breaks on many systems, and the default page is fine, so make sure it doesn't get regenerated: touch doc/flex.1 Now prepare Flex for compilation: ./configure --prefix=/usr Compile the package: make To test the results, issue: make check. Now install the package: make install There are some packages that expect to find the lex library in /usr/lib. Create a symlink to account for this: ln -s libfl.a /usr/lib/libl.a A few programs don't know about flex yet and try to run its predecessor lex. To support those programs, create a wrapper script named lex that calls flex in lex emulation mode: cat > /usr/bin/lex << "EOF" #!/bin/sh # Begin /usr/bin/lex exec /usr/bin/flex -l "$@" # End /usr/bin/lex EOF chmod 755 /usr/bin/lex Contents of Flex Installed programs Installed library flex, flex++ (link to flex) and lex libfl.a Short descriptions flex flex is a tool for generating programs that recognize patterns in text. Pattern recognition is useful in many applications. From a set of rules on what to look for, flex makes a program that looks for those patterns. The reason to use flex is that it is much easier to specify the rules for a pattern-finding program than to write the program. flex++ flex++ invokes a version of flex that is used exclusively for C++ scanners. libfl.a libfl.a is the flex library.