Misuse of lex

Vern Paxson vern at lbl-csam.arpa
Tue Mar 10 14:08:59 AEST 1987


Mohamed Ellozy wrote that it is a misuse of lex to recognize a long
list of reserved words along with a general identifier pattern, because
the resulting lexical analyzers are huge and take forever to generate
and compile.  This is quite true; however, we have a from-the-ground-up
rewrite of lex, soon to be made available, which is optimized for just
these kinds of scanners.  It runs much faster than lex and produces
smaller scanners which execute faster.  If there's interest and Mohamed
mails me his inputs, I'll make the timings for our version of lex, and
perhaps win a few converts to recognizing keywords with lex.

	Vern Paxson				vern at lbl-csam.arpa
	Real Time Systems			ucbvax!lbl-csam.arpa!vern
	Lawrence Berkeley Laboratory		(415) 486-6411



More information about the Comp.unix.wizards mailing list