%general-entities; ]> flex &flex-version;
&flex-url;
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>&flex-ch6-sbu;</seg> <seg>&flex-ch6-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Flex Apply a patch that fixes a bug in the C++ scanner generator, that causes scanner compilation to fail when using GCC-&gcc-version;: patch -Np1 -i ../&flex-gcc-patch; Prepare Flex for compilation: ./configure --prefix=/usr Compile the package: make To test the results (about 0.5 SBU), issue: make check 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 -sv libfl.a /usr/lib/libl.a A few programs do not 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 -v 755 /usr/bin/lex If desired, install the flex.pdf documentation file: mkdir -v /usr/share/doc/flex-&flex-version; cp -v doc/flex.pdf \ /usr/share/doc/flex-&flex-version; Contents of Flex Installed programs Installed library flex and lex libfl.a Short Descriptions flex 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 flex lex A script that runs flex in lex emulation mode lex libfl.a The flex library libfl.a