Installing Flex-2.5.4a

Estimated build time:           1 minute
Estimated required disk space:  3MB

Installation of Flex

Install Flex by running the following commands:

./configure --prefix=/usr &&
make &&
make install

Some programs don't know about flex and try to find the lex program (flex is a (better) alternative for lex). So to please those few programs out there we'll create a lex script that calls flex and have it emulate lex.

Create a new file /usr/bin/lex by running the following:

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

The Flex package contains the flex program

Description

Flex is a tool for generating programs which recognize patterns in text. Pattern recognition is very useful in many applications. A user sets up rules what to look for and flex will make a program that looks for those patterns. The reason people use flex is that it is much easier to sets up rules for what to look for than to write the actual program that finds the text.

Dependencies

Flex-2.5.4a needs the following to be installed:


sh from the bash package

ar from the binutils package
as from the binutils package
ld from the binutils package

bison from the bison package
yacc from the bison package

chmod from the fileutils package
cp from the fileutils package
ln from the fileutils package
mv from the fileutils package
rm from the fileutils package
touch from the fileutils package

cc from the gcc package

egrep from the grep package
grep from the grep package

make from the make package

sed from the sed package

dirname from the sh-utils package

cat from the textutils package
tr from the textutils package