"Re: Identifier significance CHALLENGE - (nf)"

davidson at ihlpf.UUCP davidson at ihlpf.UUCP
Thu Dec 8 10:00:42 AEST 1983


#R:sdcsvax:-6000:ihlpf:18400006:000:840
ihlpf!dap1    Dec  7 10:19:00 1983

It sounds like you are asking for a hashing function from the set of
(Berkeley identifiers) to the set of (Standard C identifiers).  There are
ways to do this, but none of them that I know of would lend themselves very
well to this particular situation.  You could perform normal hashing to get
a number from 1 to 10^8 - 1 and then prepend an X to the front, but your
identiers won't be very identifiable.  I don't see how you are going to
create a utility that can come up with very reasonable choices when choosing
between identifiers such as "thisthing" and "thisthinghere".  It seems like
the best you could do is have a utility to identify any identifiers longer
than 8 characters, inquire for the new name from the user and then do the
replacement throughout.  I wouldn think this could be accomplished in YACC.

Darrell Plank
BTL-IH



More information about the Comp.lang.c mailing list