I wonder, why is Flex used even till now as far as I know?
If it is not used now and was used earlier, then also what is the advantage it provided over writing C code directly?
This is what I read about Flex
It takes as its input a text file containing regular expressions, together with the action to be taken when each expression is matched. It produces an output file that contains C source code defining a function
yylex
that is a table-driven implementation of a DFA corresponding to the regular expressions of the input file. The Flex output file is then compiled with a C compiler to get an executable.
What is the need of Flex? Is it better than writing directly C programs? better in terms of execution or speed of code writing?
I am referring this as my source