Estimated build time: 1 minute Estimated required disk space: 3MB |
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 |
flex, flex++ (link to flex) and lex
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.
flex++ invokes a version of flex which is used exclusively for C++ scanners.
We create a yacc script which calls flex using the -l option. This is for compatibility purposes for programs which use lex instead of flex.
libfl.a
No description is currently available.
Flex-2.5.4a needs the following to be installed:
bash: sh
binutils: ar, as, ld
bison: bison, yacc
fileutils: chmod, cp, ln, mv, rm, touch
gcc: cc
grep: egrep, grep
make: make
sed: sed
sh-utils: dirname
textutils: cat, tr