Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!pt!ius2.cs.cmu.edu!edw From: edw@ius2.cs.cmu.edu (Eddie Wyatt) Newsgroups: comp.lang.c,comp.sys.ibm.pc,comp.unix.wizards Subject: Re: Help! DOS version of LEX needed. Message-ID: <1229@ius2.cs.cmu.edu> Date: Wed, 8-Jul-87 10:24:44 EDT Article-I.D.: ius2.1229 Posted: Wed Jul 8 10:24:44 1987 Date-Received: Sat, 11-Jul-87 05:37:47 EDT References: <4294@jade.BERKELEY.EDU> Distribution: na Organization: Carnegie-Mellon University, CS/RI Lines: 32 Keywords: LEX Xref: mnetor comp.lang.c:2913 comp.sys.ibm.pc:5454 comp.unix.wizards:3167 In article <4294@jade.BERKELEY.EDU>, ehughes@violet.berkeley.edu writes: > > Help! I need a LEX that will run under DOS 3.x. The only one I know of is > the inadequate one that I am currently using (Austin Code Works). If you can > help me send mail to ucbvax!violet!ehughes, or post if you think it of > general interest. > > Eric Hughes > ubcvax!violet!ehughes, etc. etc. (again this really doesn't belong in comp.lang.c but ....) Write your own lex analysizer. I'm not saying rewrite LEX but write the code that turns the text stream into a token stream from scratch. It really isn't that hard and you would probably write more effecient code than what "lex" turns out. I've rewritten a few modules that used "lex" code. Here's one example. Profiling the code showed that about .75 msecs were being spent in yylex (most of that time in yylook). I rewrote the lexigraphic analysizer in C to get yylex running at .15 msecs (5 times faster!). Another one I rewrote didn't get such an astounding increase (1.5 increase in speed). So I suggest you scrap "lex" all together. -- Eddie Wyatt e-mail: edw@ius2.cs.cmu.edu terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.