6.30. Flex-2.6.2

The Flex package contains a utility for generating programs that recognize patterns in text.

Approximate build time: 0.4 SBU
Required disk space: 31 MB

6.30.1. Installation of Flex

Fix an issue that was discovered after release:

patch -Np1 -i ../flex-2.6.2-fixes-1.patch &&
touch src/scan.*

The build procedure assumes the help2man program is available to create a man page from the executable --help option. This is not present, so we use an environment variable to skip this process. Now, prepare Flex for compilation:

HELP2MAN=/tools/bin/true \
./configure --prefix=/usr --docdir=/usr/share/doc/flex-2.6.2

Compile the package:

make

To test the results (about 0.5 SBU), issue:

make check

One test, cxx_restart, is known to fail.

Install the package:

make install

A few programs do not know about flex yet and try to run its predecessor, lex. To support those programs, create a symbolic link named lex that runs flex in lex emulation mode:

ln -sv flex /usr/bin/lex

6.30.2. Contents of Flex

Installed programs: flex, flex++ (link to flex), and lex (link to flex)
Installed libraries: libfl.so and libfl_pic.so
Installed directory: /usr/share/doc/flex-2.6.2

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++

An extension of flex, is used for generating C++ code and classes. It is a symbolic link to flex

lex

A script that runs flex in lex emulation mode

libfl

The flex library