10.22. Flex-2.6.4 64 Bit

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

10.22.1. Installation of Flex

Prepare Flex for compilation:

CC="gcc ${BUILD64}" ./configure \
    --prefix=/usr \
    --libdir=/usr/lib64 \
    --docdir=/usr/share/doc/flex-2.6.4

Compile the package:

make

To test the results, issue:

make check

The test suite will report 3 failures for tests that use bison, which is not installed yet. For full test coverage, you can run Flex's test suite again after Bison is installed.

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

10.22.2. Contents of Flex

Installed programs: flex, flex++ (link to flex), lex
Installed libraries: libfl.[a,so], libfl_pic.[a,so]
Installed directory: /usr/share/doc/flex-2.6.4

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

Link to flex which makes it generate C++ scanner classes

lex

A script that runs flex in lex emulation mode

libfl

The flex library

libfl_pic

The flex library