On Thu, May 10, 2001 at 04:26:56PM -0700, Daniel S. Wilkerson wrote:
> Flex - Put all of flex right into Perl. Flex is simply an event
> engine (-compiler) for driving calls against code according to regular
> expression matching events. While it is often convenient to have the
> the flow of control expressed in an imperative way (do this; do this;
> do this) as Perl already has, the event-driven regular expression
> matching that lexers offer would allow one to easily write
> mini-language interpreters or pre-processors in Perl very easily.
Don't we already have that in Perl 5?
if ( /\G\s+/gc ) { # whitespaces
}
elsif ( /\G[*/+-]/gc ) { # operator
}
elsif ( /\G\d+/gc ) { # term
}
elsif ( /\G.+/gc ) { # unrecognized token
}
--
Tad McClellan SGML consulting
[EMAIL PROTECTED] Perl programming
Fort Worth, Texas