Subj : unbaja To : Deuce From : Angus McLeod Date : Sun Sep 11 2005 11:10 pm Re: unbaja By: Deuce to Angus McLeod on Sun Sep 11 2005 12:32:00 > > You could include a handful of likely candidates, such as: > > > > a, b, c, f, i, j, k, p, q, s, x, y, z, buf, buffer, cnt, count, > > hnd, handle, str, wk, wrk, work, fname, filename, val, value > > > > and so forth. If you used a look-up table instead of a switch, you could > > even externalize the table at some later date, allowing for user defined > > entries... > > Ah, actually, we were looking at doing that... depends on just how well used > unbaja becomes. What, including extra variable names? Or externalizing the table? Or both? > Of course, feel free to do it yourself... So far I have not even got it to compile! > it'd be easy enough to add a check an external file and a CRC > calculation (crc32 is localted in ../smblib) into the default case... > then probobly hold matches (and negative matches) in memory. Uh, "negative matches"? Do you mean flagging variables that *aren't* in the lookup table (internal or external) so as to prevent repeating the lookup? > Actually, doing the file lookup during the STR and INT declarations would ma > the most sense... then just have the default case search through matched nam > before it uses a var_* format. What about building a short symbol table for variables as you encounter them. When you find a new variable, you do a lookup for the name, and if you don't find it, you create a name using var_. This name gets stuck into the short symbol table. If you encounter the variable again, you use the name found in the short symbol table (no internal or external lookup needed). > If you wait for me to do it, it'll most likely be some time before I finish > up... Yeah, figured that. > I don't suppose there's a table of crc32 matches to upper-case > alphanumeric strings on the internet somewhere is there? You mean a reverse-lookup for CRC32 to UC alpha? Not that I am aware. Trouble is, it is a one-to-many relationship too! --- þ Synchronet þ Great programs on the Synchronet Channel at The ANJO BBS .