Re: Lex Source Code

a.burmester@hamburg.de (Andreas Burmester)
3 Dec 2003 20:43:35 -0500

          From comp.compilers

Related articles
Lex Source Code tronaREMOVETHIS@ameritech.net (Thomas Ronayne) (2003-11-21)
Re: Lex Source Code a.burmester@hamburg.de (2003-12-03)
| List of all articles for this month |

From: a.burmester@hamburg.de (Andreas Burmester)
Newsgroups: comp.compilers
Date: 3 Dec 2003 20:43:35 -0500
Organization: Compilers Central
References: 03-11-082
Keywords: lex, history
Posted-Date: 03 Dec 2003 20:43:35 EST

Thomas Ronayne <tronaREMOVETHIS@ameritech.net> writes:


>I have an application -- awkcc -- that I've happily used for some years
>in Solaris. Trying to port to Linux, there are a number of functions in
>lex that are not part of flex: yybgin, yysvec, yysptr, yysbuf, yytchar,
>yysptr. I'm not smart enough about flex to be able to figure out what
>these things are supposed to do from just the source code and I'm
>wondering, given that Solaris lex works just fine, if it's possible to
>obtain the source code for lex so I can just build that and install it
>(/usr/bin/lex on my Linux systems just executes "flex -l $*)?


>Thanks.
>[I dug it up for him out of the old 32V distribution which Caldera
>released to the public some years ago. It doesn't compile under a
>modern C compiler, either, of course. -John]


- Supply and add to Makefile a stub cfree.c:


    cfree(p, num, size)
    char *p;
    unsigned num, size;
    {
                    free(p);
    }


    Which was/is part of 32V's /usr/src/libc/gen/calloc.c.


- Compile parser.y with 32V's own yacc, that supplies the missing
    yyparse().


- Copy 32V's /usr/lib/lex/ncform to an appropiate place and modify
    cname's initializer in once.c, line 57 accordingly.


- Live with many "incompatible pointer types" and type conversions
    "without a cast". :-)


Et voila.


b.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.