schmidt@ics.uci.edu (Doug Schmidt) (05/30/89)
Version 1.7 of GPERF, a perfect hash function generator used to
produce the keyword recognizer in the lexical analyzer for both GNU CC
and GNU C++, is now available via anonymous ftp from the ~ftp/pub
directory on ics.uci.edu (128.195.1.1).
There are now two versions supported, one written in GNU G++
(gperf-1.7.tar.Z) and another written in K&R C (cperf-1.7.tar.Z).
They should have identical behavior, with the only difference being
that the C version is portable to machines that don't run GNU G++
(yet!).
Version 1.7 includes many new features and enhancements. In
particular, it now handles duplicate keyword entries and has options
that greatly increase its performance on large (i.e. > 1000) keyword
sets. See the gperf.texinfo file for extensive documentation.
If you don't have access to anonymous ftp please let me know and I'll
mail you a copy. Please specify whether you'd like the C or G++
versions (each is around 80k when tar'ed, compressed, and uuencoded).
thanks,
Doug
p.s. You'll need the latest GNU G++ 1.35.1- release or later in order
to compile gperf-1.7.tar.Z, since this release uses static member
functions, #pragma once, and other features not available in earlier
G++ releases.
--
On a clear day, under blue skies, there is no need to seek.
And asking about Buddha +------------------------+
Is like proclaiming innocence, | schmidt@ics.uci.edu |
With loot in your pocket. | office: (714) 856-4043 |tale@pawl.rpi.edu (David C Lawrence) (05/30/89)
This is what I got as I tried to build it. I'm using G++ 1.35.1- and
everything was fine up to ...
Script started on Mon May 29 21:33:34 1989
/appl/life1/gnu/g++/libg++/gperf
imagine:gnu (1) make
(cd src; make; mv gperf ..)
g++ -v -g -O -fmemoize-lookups -fsave-memoized -fchar-charconst -finline-functions -fstrength-reduce -c readline.cc
g++ version 1.35.1-
/appl/life1/gnu/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -Dmc68020 readline.cc /tmp/cca14064.cpp
GNU CPP version 1.35
/appl/life1/gnu/lib/gcc-cc1plus /tmp/cca14064.cpp -quiet -dumpbase readline.cc -fmemoize-lookups -fsave-memoized -fchar-charconst -finline-functions -fstrength-reduce -opt -version -G -o /tmp/cca14064.s
GNU C++ version 1.35.1- (68k, MIT syntax) compiled by GNU C version 1.35.
In method struct Read_Line *Read_Line::Read_Line (struct _iobuf * (= ( & _iob )), int (= 1024 )):
readline.cc:57: no member function `Read_Line::op$new_expr'
make[1]: *** Error 1
mv: gperf: Cannot access: No such file or directory
make: *** Error 1 (ignored)
(cd tests; make GPERF=../gperf)
performing some tests of the perfect hash generator
gcc -c -O test.c
../gperf -p -o c.gperf > cinset.c
/bin/sh: ../gperf: not found
make[1]: *** Error 1
make: *** Error 1 (ignored)
script done on Mon May 29 21:34:05 1989
Dave
--
(setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))schmidt@ics.uci.edu (Doug Schmidt) (05/30/89)
In article <TALE.89May29214513@imagine.pawl.rpi.edu> tale@pawl.rpi.edu writes:
++ This is what I got as I tried to build it. I'm using G++ 1.35.1- and
++ everything was fine up to ...
++
++ Script started on Mon May 29 21:33:34 1989
++ /appl/life1/gnu/g++/libg++/gperf
++ imagine:gnu (1) make
++ (cd src; make; mv gperf ..)
++ g++ -v -g -O -fmemoize-lookups -fsave-memoized -fchar-charconst -finline-functions -fstrength-reduce -c readline.cc
++ g++ version 1.35.1-
++ /appl/life1/gnu/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dmc68000 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__OPTIMIZE__ -Dmc68020 readline.cc /tmp/cca14064.cpp
++ GNU CPP version 1.35
++ /appl/life1/gnu/lib/gcc-cc1plus /tmp/cca14064.cpp -quiet -dumpbase readline.cc -fmemoize-lookups -fsave-memoized -fchar-charconst -finline-functions -fstrength-reduce -opt -version -G -o /tmp/cca14064.s
++ GNU C++ version 1.35.1- (68k, MIT syntax) compiled by GNU C version 1.35.
++ In method struct Read_Line *Read_Line::Read_Line (struct _iobuf * (= ( & _iob )), int (= 1024 )):
++ readline.cc:57: no member function `Read_Line::op$new_expr'
++ make[1]: *** Error 1
++ mv: gperf: Cannot access: No such file or directory
++ make: *** Error 1 (ignored)
++ (cd tests; make GPERF=../gperf)
++ performing some tests of the perfect hash generator
++ gcc -c -O test.c
++ ../gperf -p -o c.gperf > cinset.c
++ /bin/sh: ../gperf: not found
++ make[1]: *** Error 1
++ make: *** Error 1 (ignored)
++
++ script done on Mon May 29 21:34:05 1989
Sigh. I'm afraid that my version of GNU G++ is more recent than g++
1.35.1-. Michael fixed a bug with declaring `global operator new' as
a class friend, but it looks like this fix didn't make it into your
G++ version (if you check out gperf's ChangeLog you'll see this global
operator new feature has been included/removed/included several times
recently).
If you don't feel like installing a new GNU G++ here are some patches
to the G++ version of GPERF that fix the problem. Alternatively, you
can get the C version of gperf (that should work fine either with GCC
or your friendly neighborhood cc compiler).
Sorry for the inconvenience!
Doug
----------------------------------------
*** readline.cc~ Thu May 25 14:17:44 1989
--- readline.cc Mon May 29 20:45:50 1989
***************
*** 27,33 ****
strings are allocated. */
static inline void *
! operator new (long size)
{
char *temp;
--- 27,33 ----
strings are allocated. */
static inline void *
! new_string (long size)
{
char *temp;
***************
*** 83,89 ****
c = (chunks * chunk_size + bufptr - buf) + 1;
! if (ptr = new char[c])
{
for (*(ptr += (c - 1)) = '\0'; bufptr != buf; *--ptr = *--bufptr)
--- 83,89 ----
c = (chunks * chunk_size + bufptr - buf) + 1;
! if (ptr = new_string (c))
{
for (*(ptr += (c - 1)) = '\0'; bufptr != buf; *--ptr = *--bufptr)
*** readline.h~ Thu May 25 14:00:38 1989
--- readline.h Mon May 29 20:44:40 1989
***************
*** 29,35 ****
class Read_Line
{
! friend void *operator new (long size);
private:
char *readln_aux (int chunks);
FILE *fp; /* FILE pointer to the input stream. */
--- 29,35 ----
class Read_Line
{
! friend void *new_string (long size);
private:
char *readln_aux (int chunks);
FILE *fp; /* FILE pointer to the input stream. */
--
On a clear day, under blue skies, there is no need to seek.
And asking about Buddha +------------------------+
Is like proclaiming innocence, | schmidt@ics.uci.edu |
With loot in your pocket. | office: (714) 856-4043 |