Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lex Source Code

30 views
Skip to first unread message

Thomas Ronayne

unread,
Nov 21, 2003, 12:44:17 AM11/21/03
to
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]

Andreas Burmester

unread,
Dec 3, 2003, 8:43:35 PM12/3/03
to
Thomas Ronayne <tronaRE...@ameritech.net> writes:

- 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.

0 new messages