Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!hsdndev!spdcc!iecc!compilers-sender From: L.Parkes@comp.vuw.ac.nz (Lloyd Parkes) Newsgroups: comp.compilers Subject: Re: Desperately seeking PD lex source Keywords: flex Message-ID: Date: 3 Dec 90 16:09:42 GMT References: <3708@rwthinf.UUCP> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: L.Parkes@comp.vuw.ac.nz (Lloyd Parkes) Organization: Dept. of Computer Science, Victoria Uni. of Wellington, NZ. Lines: 36 Approved: compilers@iecc.cambridge.ma.us In-Reply-To: windy@strange.informatik.rwth-aachen.de's message of 28 Nov 90 11:26:55 GMT In article windy@strange.informatik.rwth-aachen.de (Andrew John Stuart Miller) writes: >I am looking for a standard PD lex as C source including its library.... >[I haven't seen any other free lex than flex. What's wrong with flex? I work With Michael. The problem is that flex complies under MINIX-PC version 1.5.10, but crashes due to a serious lack of address space (64K text, 64K stack and data!?!) I have managed to get flex going under MINIX-PC version 1.5.10. It handles my pascal.l file ok. I did have to go through flexdef.h and reduce all the #define sizes by an order of magnitude. This doesn't reduce your memory requirements by an order of magnitude, it does however give flex much finer granularity when allocating memory. I also reduced the hash tables sizes from 101 entries to 37. They could be made smaller. Removing the #define for eight bit scanners at the top of flexdef.h also helps. All this reduced the BSS segment size from 16k to 8k. (Sorry my PC with the actual numbers on it is at home). The big problem is the DATA segment is 24k. This is the static data used by the parser. The Minix version of Clunie (?) YACC seems to produce slightly less data. You just have to edit y.tab.c so that yylval is no longer defined as extern. Otherwise flex fails to link. I found that the -v option produces lots of useful information about how much memory flex takes to generate your scanner. Lloyd -- Lloyd Parkes lloyd@comp.vuw.ac.nz -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request. Brought to you by Super Global Mega Corp .com