> What is flex ?

Flex is the gnu clone of "lex",  one of the original unix lexical analysis
tools.

A lexer (that's what you get when you run flex on a flex file) is used to
break up input into "tokens",  which are the atomic units of programming
languages or other specifications.  In english,  tokens are probably best
thought of as words.  In something like C,  tokens are keywords ("if",
"else"),  or numbers ("1423") or operators ("+", "=", ";"),  or function
names ("do_foo()"),  etc...

A decent book on compiler construction could probably explain
it better.  "Compilers: Principles,  Techniques,  and Tools" by Aho,
Sethi, and Ullman  (1984,  Addison-Wesley,  also called "The Dragon Book"
because it's got a picture of a dragon on the front) is probably the
standard compilers text.

                                                        Will


--------------------------------------------------------------------------
|             [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]           |
|                       http://www.cis.udel.edu/~lowe/                   |
|    PGP Public Key:  http://www.cis.udel.edu/~lowe/index.html#pgpkey    |
--------------------------------------------------------------------------
|           You think you're so smart,  but I've seen you naked          |
|                  and I'll prob'ly see you naked again ...              |
|                 --The Barenaked Ladies,  "Blame It On Me"              |
--------------------------------------------------------------------------

Reply via email to