Mail Archives: djgpp/1997/06/14/05:48:59
acebear AT pukopn1 DOT puk DOT ac DOT za wrote:
>
> What do you use the DJGPP utility flex for?
well, flex is used to "autogenerate" c code given a set of conditions
and actions. if you've ever written an awk script, it looks a lot like
a flex lexer. that's not very clear, is it?
basically, you code some text based rule, and a corresponding action for
when that rule is satisfied. something like:
if(lot's of x's) then (make x's into o's)
that's not flex code, but that's the kind of thing it does. if you are
weak on regular expressions it will be a bit challenging, since that's
what it runs on. it's really useful for writing something like a text
processor-- something with lot's of simple decisions to be made. i
recommend the documentation, which is excellent.
phil
- Raw text -