[comp.compilers] Desperately seeking PD lex source

u31b3hs@cip-s07.informatik.rwth-aachen.de (Michael Haardt) (11/26/90)

Hello world!

I am looking for a standard PD lex as C source including its library.  I do
*not* want flex for some reasons.  If someone knows where I can ftp sources,
please send email or post the name of the server (including adress in
numbers).  Please do not mail me sources if you have such a thing, I have to
pay for mail I get.  I am only looking for lex, I am using Berkeley yacc and
it works fine, but no lex at my system.

Thank you

Michael Haardt (u31b3hs@cip-s02.informatik.rwth-aachen.de)
[I haven't seen any other free lex than flex. What's wrong with flex? -John]

-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.

windy@strange.informatik.rwth-aachen.de (Andrew John Stuart Miller) (11/28/90)

u31b3hs@cip-s07.informatik.rwth-aachen.de (Michael Haardt) writes:

>I am looking for a standard PD lex as C source including its library....
woefull pleadings deleted...

>[I haven't seen any other free lex than flex. What's wrong with flex? -John]

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!?!) 

That's what's wrong with flex!

Thanks for any help.

	Andrew Miller
--
email: windy@strange.informatik.rwth-aachen.de
snail: Ruetscherstr 165  D-5100 Aachen
voice: 0049 (0)241 894-355
[Ah.  Another possibility is the lex and yacc clones described in Holub's
new compilers book, which are available on PC floppy for US$60.  They aren't
PD, but the restrictions are not unduly onerous.  There's an order card in
the back of the book. -John]
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.

markz@ssc.UUCP (Mark Zenier) (12/01/90)

In article <windy.659791615@strange>, windy@strange.informatik.rwth-aachen.de (Andrew John Stuart Miller) writes:
> >[... What's wrong with flex? -John]
> [Minix only provides 64K text, 64K stack and data]

If source code compatiblity isn't a problem, there is Charles Forsyth's
Lex aka Decus Lex.  Someone ported it to the DeSmet C, a version 7
small model compiler.

It is available from the C Users Group Library as disks 172 and 173.
C User's Group, 2601 Iowa St., Lawrence KS 66046  (913) 841-1631.

It also was available from The Austin Code Works, info@acw.com,
although I think they dropped it out of their catalog in favor of flex.

Mark Zenier
markz@ssc.uucp
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.

L.Parkes@comp.vuw.ac.nz (Lloyd Parkes) (12/04/90)

In article <windy.659791615@strange> 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.